[PATCH] Regression test for lshr codegen bug
Paweł Bylica
chfast at gmail.com
Fri Jan 23 05:38:47 PST 2015
Test for bug report http://llvm.org/bugs/show_bug.cgi?id=22304
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7141
Files:
test/CodeGen/Generic/lshr_bug_queue_is_empty.ll
Index: test/CodeGen/Generic/lshr_bug_queue_is_empty.ll
===================================================================
--- /dev/null
+++ test/CodeGen/Generic/lshr_bug_queue_is_empty.ll
@@ -0,0 +1,21 @@
+; RUN: llc < %s
+
+define void @lshr_codegen_bug_queue_is_empty() {
+entry:
+ %0 = load i256* undef
+ %1 = sub i256 0, %0
+ %k_32 = trunc i256 %1 to i5
+ %2 = zext i5 %k_32 to i256
+ %kx8 = mul i256 %2, 8
+ %bitpos = add i256 %kx8, 7
+ %bitval = lshr i256 %1, %bitpos
+ %bittest = trunc i256 %bitval to i1
+ %3 = shl i256 1, %bitpos
+ %mask = sub i256 %3, 1
+ %4 = and i256 %1, %mask
+ %5 = icmp ule i256 %1, 30
+ %6 = select i1 %bittest, i256 undef, i256 %4
+ %7 = select i1 %5, i256 %6, i256 %1
+ store i256 %7, i256* undef
+ ret void
+}
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7141.18665.patch
Type: text/x-patch
Size: 763 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150123/bb6fa94d/attachment.bin>
More information about the llvm-commits
mailing list