2014-11-11 01:27:56 +08:00
|
|
|
; RUN: llc -march=mipsel -mcpu=mips32r2 -mattr=+micromips \
|
2014-11-25 18:50:00 +08:00
|
|
|
; RUN: -relocation-model=static -O2 < %s | FileCheck %s
|
2016-03-23 18:29:38 +08:00
|
|
|
; RUN: llc -march=mipsel -mcpu=mips32r6 -mattr=+micromips \
|
|
|
|
; RUN: -relocation-model=static -O2 < %s | FileCheck %s -check-prefix=CHECK-MMR6
|
2014-11-11 01:27:56 +08:00
|
|
|
|
2014-11-25 18:50:00 +08:00
|
|
|
; Function Attrs: nounwind
|
|
|
|
define i32 @foo(i32 signext %a) #0 {
|
2014-11-11 01:27:56 +08:00
|
|
|
entry:
|
|
|
|
%a.addr = alloca i32, align 4
|
|
|
|
store i32 %a, i32* %a.addr, align 4
|
2015-02-28 05:17:42 +08:00
|
|
|
%0 = load i32, i32* %a.addr, align 4
|
2014-11-11 01:27:56 +08:00
|
|
|
%shl = shl i32 %0, 2
|
2014-11-25 18:50:00 +08:00
|
|
|
%call = call i32 @bar(i32 signext %shl)
|
2014-11-11 01:27:56 +08:00
|
|
|
ret i32 %call
|
|
|
|
}
|
|
|
|
|
2014-11-25 18:50:00 +08:00
|
|
|
declare i32 @bar(i32 signext) #1
|
2014-11-11 01:27:56 +08:00
|
|
|
|
2014-11-25 18:50:00 +08:00
|
|
|
; CHECK: jals
|
|
|
|
; CHECK-NEXT: sll16
|
2016-03-23 18:29:38 +08:00
|
|
|
; CHECK-MMR6: jal
|
|
|
|
; CHECK-MMR6-NOT: sll16
|