Home | History | Annotate | Download | only in PowerPC
      1 ; RUN: llc < %s -march=ppc64 -O1 | FileCheck %s
      2 ; RUN: llc < %s -march=ppc64 | FileCheck --check-prefix=CHECK-OPT  %s
      3 
      4         %struct.__db_region = type { %struct.__mutex_t, [4 x i8], %struct.anon, i32, [1 x i32] }
      5         %struct.__mutex_t = type { i32 }
      6         %struct.anon = type { i64, i64 }
      7 
      8 define void @foo() {
      9 entry:
     10         %ttype = alloca i32, align 4            ; <i32*> [#uses=1]
     11         %regs = alloca [1024 x %struct.__db_region], align 16           ; <[1024 x %struct.__db_region]*> [#uses=0]
     12         %tmp = load i32, i32* %ttype, align 4                ; <i32> [#uses=1]
     13         %tmp1 = call i32 (...) @bork( i32 %tmp )               ; <i32> [#uses=0]
     14         ret void
     15 
     16 ; CHECK: @foo
     17 ; CHECK: lwzx
     18 ; CHECK: blr
     19 ; CHECK-OPT: @foo
     20 ; CHECK-OPT: lwz
     21 ; CHECK-OPT: blr
     22 }
     23 
     24 define signext i32 @test(i32* noalias nocapture readonly %b, i32 signext %n)  {
     25 entry:
     26   %idxprom = sext i32 %n to i64
     27   %arrayidx = getelementptr inbounds i32, i32* %b, i64 %idxprom
     28   %0 = load i32, i32* %arrayidx, align 4
     29   %mul = mul nsw i32 %0, 7
     30   ret i32 %mul
     31 
     32 ; CHECK-OPT: @test
     33 ; CHECK-OPT: lwzx
     34 ; CHECK-OPT: blr
     35 
     36 }
     37 
     38 
     39 declare i32 @bork(...)
     40