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 +}