summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Hexagon/tstbit.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/Hexagon/tstbit.ll')
-rw-r--r--llvm/test/CodeGen/Hexagon/tstbit.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Hexagon/tstbit.ll b/llvm/test/CodeGen/Hexagon/tstbit.ll
new file mode 100644
index 00000000000..f28f031a020
--- /dev/null
+++ b/llvm/test/CodeGen/Hexagon/tstbit.ll
@@ -0,0 +1,14 @@
+; RUN: llc -march=hexagon < %s | FileCheck %s
+; CHECK: tstbit
+
+; Function Attrs: nounwind readnone
+define i32 @f0(i32 %a0, i32 %a1) #0 {
+b0:
+ %v0 = shl i32 1, %a1
+ %v1 = and i32 %v0, %a0
+ %v2 = icmp ne i32 %v1, 0
+ %v3 = zext i1 %v2 to i32
+ ret i32 %v3
+}
+
+attributes #0 = { nounwind readnone }
OpenPOWER on IntegriCloud