summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorAnton Korobeynikov <anton@korobeynikov.info>2018-11-16 19:36:15 +0000
committerAnton Korobeynikov <anton@korobeynikov.info>2018-11-16 19:36:15 +0000
commite5cb1c35b4ec58c88dc2ef18eec609d67b33ec81 (patch)
treee2490d115e7d5bda490cd6a4bbf3f56700d3f587 /llvm/test
parent3a381757232d26905d3137431752079c14559472 (diff)
downloadbcm5719-llvm-e5cb1c35b4ec58c88dc2ef18eec609d67b33ec81.tar.gz
bcm5719-llvm-e5cb1c35b4ec58c88dc2ef18eec609d67b33ec81.zip
[MSP430] Add RTLIB::[SRL/SRA/SHL]_I32 lowering to EABI lib calls
Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D54626 llvm-svn: 347080
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/MSP430/libcalls.ll35
1 files changed, 35 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/MSP430/libcalls.ll b/llvm/test/CodeGen/MSP430/libcalls.ll
index 30402377813..b6e24db6c55 100644
--- a/llvm/test/CodeGen/MSP430/libcalls.ll
+++ b/llvm/test/CodeGen/MSP430/libcalls.ll
@@ -604,4 +604,39 @@ entry:
ret i64 %1
}
+@i = external global i32, align 2
+
+define i32 @srll() #0 {
+entry:
+; CHECK-LABEL: srll:
+; CHECK: call #__mspabi_srll
+ %0 = load volatile i32, i32* @g_i32, align 2
+ %1 = load volatile i32, i32* @i, align 2
+ %shr = lshr i32 %0, %1
+
+ ret i32 %shr
+}
+
+define i32 @sral() #0 {
+entry:
+; CHECK-LABEL: sral:
+; CHECK: call #__mspabi_sral
+ %0 = load volatile i32, i32* @g_i32, align 2
+ %1 = load volatile i32, i32* @i, align 2
+ %shr = ashr i32 %0, %1
+
+ ret i32 %shr
+}
+
+define i32 @slll() #0 {
+entry:
+; CHECK-LABEL: slll:
+; CHECK: call #__mspabi_slll
+ %0 = load volatile i32, i32* @g_i32, align 2
+ %1 = load volatile i32, i32* @i, align 2
+ %shr = shl i32 %0, %1
+
+ ret i32 %shr
+}
+
attributes #0 = { nounwind }
OpenPOWER on IntegriCloud