blob: 5c6aa36a413026fa592e11419bbc89f06eafe608 [file] [log] [blame]
Zoran Jovanovic37bca102014-11-10 17:27:56 +00001; RUN: llc -march=mipsel -mcpu=mips32r2 -mattr=+micromips \
Zoran Jovanovicb554bba2014-11-25 10:50:00 +00002; RUN: -relocation-model=static -O2 < %s | FileCheck %s
Hrvoje Vargac45baf22016-03-23 10:29:38 +00003; RUN: llc -march=mipsel -mcpu=mips32r6 -mattr=+micromips \
4; RUN: -relocation-model=static -O2 < %s | FileCheck %s -check-prefix=CHECK-MMR6
Zoran Jovanovic37bca102014-11-10 17:27:56 +00005
Zoran Jovanovicb554bba2014-11-25 10:50:00 +00006; Function Attrs: nounwind
7define i32 @foo(i32 signext %a) #0 {
Zoran Jovanovic37bca102014-11-10 17:27:56 +00008entry:
9 %a.addr = alloca i32, align 4
10 store i32 %a, i32* %a.addr, align 4
David Blaikiea79ac142015-02-27 21:17:42 +000011 %0 = load i32, i32* %a.addr, align 4
Zoran Jovanovic37bca102014-11-10 17:27:56 +000012 %shl = shl i32 %0, 2
Zoran Jovanovicb554bba2014-11-25 10:50:00 +000013 %call = call i32 @bar(i32 signext %shl)
Zoran Jovanovic37bca102014-11-10 17:27:56 +000014 ret i32 %call
15}
16
Zoran Jovanovicb554bba2014-11-25 10:50:00 +000017declare i32 @bar(i32 signext) #1
Zoran Jovanovic37bca102014-11-10 17:27:56 +000018
Zoran Jovanovicb554bba2014-11-25 10:50:00 +000019; CHECK: jals
20; CHECK-NEXT: sll16
Hrvoje Vargac45baf22016-03-23 10:29:38 +000021; CHECK-MMR6: jal
22; CHECK-MMR6-NOT: sll16