2017-01-02 19:17:04 +00:00
|
|
|
; RUN: llc -verify-machineinstrs < %s -march=ppc64 -O1 | FileCheck %s
|
|
|
|
; RUN: llc -verify-machineinstrs < %s -march=ppc64 | FileCheck --check-prefix=CHECK-OPT %s
|
2009-06-02 17:52:33 +00:00
|
|
|
|
|
|
|
%struct.__db_region = type { %struct.__mutex_t, [4 x i8], %struct.anon, i32, [1 x i32] }
|
|
|
|
%struct.__mutex_t = type { i32 }
|
|
|
|
%struct.anon = type { i64, i64 }
|
|
|
|
|
|
|
|
define void @foo() {
|
|
|
|
entry:
|
|
|
|
%ttype = alloca i32, align 4 ; <i32*> [#uses=1]
|
|
|
|
%regs = alloca [1024 x %struct.__db_region], align 16 ; <[1024 x %struct.__db_region]*> [#uses=0]
|
2015-05-27 18:44:32 +00:00
|
|
|
%tmp = load i32, i32* %ttype, align 4 ; <i32> [#uses=1]
|
|
|
|
%tmp1 = call i32 (...) @bork( i32 %tmp ) ; <i32> [#uses=0]
|
2009-06-02 17:52:33 +00:00
|
|
|
ret void
|
2013-06-10 20:36:52 +00:00
|
|
|
|
|
|
|
; CHECK: @foo
|
|
|
|
; CHECK: lwzx
|
|
|
|
; CHECK: blr
|
2016-07-23 20:41:05 +00:00
|
|
|
; CHECK-OPT: @foo
|
|
|
|
; CHECK-OPT: lwz
|
|
|
|
; CHECK-OPT: blr
|
2009-06-02 17:52:33 +00:00
|
|
|
}
|
|
|
|
|
2016-07-23 20:41:05 +00:00
|
|
|
define signext i32 @test(i32* noalias nocapture readonly %b, i32 signext %n) {
|
|
|
|
entry:
|
|
|
|
%idxprom = sext i32 %n to i64
|
|
|
|
%arrayidx = getelementptr inbounds i32, i32* %b, i64 %idxprom
|
|
|
|
%0 = load i32, i32* %arrayidx, align 4
|
|
|
|
%mul = mul nsw i32 %0, 7
|
|
|
|
ret i32 %mul
|
|
|
|
|
|
|
|
; CHECK-OPT: @test
|
|
|
|
; CHECK-OPT: lwzx
|
|
|
|
; CHECK-OPT: blr
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-06-02 17:52:33 +00:00
|
|
|
declare i32 @bork(...)
|