[PATCH] Big shift test

Paweł Bylica chfast at gmail.com
Thu Feb 19 04:48:11 PST 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7752

Files:
  test/ExecutionEngine/MCJIT/big_shift.ll

Index: test/ExecutionEngine/MCJIT/big_shift.ll
===================================================================
--- /dev/null
+++ test/ExecutionEngine/MCJIT/big_shift.ll
@@ -0,0 +1,16 @@
+; RUN: %lli %s > /dev/null
+
+define i32 @main()
+{
+    %b = call i256 @shift(i256 0)
+
+    %ne = icmp ne i256 1, %b
+    %r = zext i1 %ne to i32
+    ret i32 %r  ; 0 means test passed
+}
+
+define i256 @shift(i256 %c)
+{
+	%b = shl i256 1, %c  ; %c must not be a constant
+	ret i256 %b
+}

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7752.20193.patch
Type: text/x-patch
Size: 483 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150219/21c35551/attachment.bin>


More information about the llvm-commits mailing list