diff --git a/test/Transforms/InstCombine/2006-11-10-ashr-miscompile.ll b/test/Transforms/InstCombine/2006-11-10-ashr-miscompile.ll new file mode 100644 index 00000000000..85c1f915940 --- /dev/null +++ b/test/Transforms/InstCombine/2006-11-10-ashr-miscompile.ll @@ -0,0 +1,7 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep lshr +; Verify this is not turned into -1. + +int %test(ubyte %amt) { + %B = lshr int -1, ubyte %amt + ret int %B +}