From cedfd2c78d845336501df3b6eceb430b58783aa4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 23 Feb 2004 20:19:51 +0000 Subject: [PATCH] New testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11766 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../InstCombine/2004-02-23-ShiftShiftOverflow.ll | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll diff --git a/test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll b/test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll new file mode 100644 index 00000000000..911a73f57c2 --- /dev/null +++ b/test/Transforms/InstCombine/2004-02-23-ShiftShiftOverflow.ll @@ -0,0 +1,8 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 34 + +int %test(int %X) { + ; Do not fold into shr X, 34, as this uses undefined behavior! + %Y = shr int %X, ubyte 17 + %Z = shr int %Y, ubyte 17 + ret int %Z +} -- 2.34.1