brintos

brintos / llvm-project-archived public Read only

0
0
Text · 797 B · 4110428 Raw
27 lines · plain
1; RUN: llc < %s | FileCheck %s2 3; Test to make sure that if math that can roll over has been used we don't4; use the potential overflow as the basis for an address calculation later by5; sinking it into a different basic block.6 7target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"8target triple = "x86_64-apple-macosx10.9.0"9 10; Function Attrs: nounwind ssp uwtable11define void @test_sink(ptr %arg1, i32 %arg2, i8 %arg3) #0 {12  %tmp1 = add i32 -2147483648, %arg213  %tmp2 = add i32 -2147483648, %tmp114  %tmp3 = getelementptr i8, ptr %arg1, i32 %arg215  br label %bb116 17bb1:18  %tmp4 = getelementptr i8, ptr %arg1, i32 %tmp219  store i8 %arg3, ptr %tmp420  ret void;21}22 23; CHECK-LABEL: test_sink:24; CHECK:   movslq  %esi, [[TEMP:%[a-z0-9]+]]25; CHECK:   movb    %dl, (%rdi,[[TEMP]])26; CHECK:   retq27