From d6c69e9bba71d647e7bfe03de91242b57f618dde Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 2 Sep 2005 06:12:12 +0000 Subject: [PATCH] new testcase for recent bugfix git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23212 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../2005-09-01-ArrayOutOfBounds.ll | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll diff --git a/test/Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll b/test/Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll new file mode 100644 index 00000000000..958f9797a26 --- /dev/null +++ b/test/Transforms/Reassociate/2005-09-01-ArrayOutOfBounds.ll @@ -0,0 +1,21 @@ +; RUN: llvm-as < %s | opt -reassociate -instcombine | llvm-dis | grep 'ret int 0' + +int %f(int %a0, int %a1, int %a2, int %a3, int %a4) { + %tmp.2 = add int %a4, %a3 ; [#uses=1] + %tmp.4 = add int %tmp.2, %a2 ; [#uses=1] + %tmp.6 = add int %tmp.4, %a1 ; [#uses=1] + %tmp.8 = add int %tmp.6, %a0 ; [#uses=1] + %tmp.11 = add int %a3, %a2 ; [#uses=1] + %tmp.13 = add int %tmp.11, %a1 ; [#uses=1] + %tmp.15 = add int %tmp.13, %a0 ; [#uses=1] + %tmp.18 = add int %a2, %a1 ; [#uses=1] + %tmp.20 = add int %tmp.18, %a0 ; [#uses=1] + %tmp.23 = add int %a1, %a0 ; [#uses=1] + %tmp.26 = sub int %tmp.8, %tmp.15 ; [#uses=1] + %tmp.28 = add int %tmp.26, %tmp.20 ; [#uses=1] + %tmp.30 = sub int %tmp.28, %tmp.23 ; [#uses=1] + %tmp.32 = sub int %tmp.30, %a4 ; [#uses=1] + %tmp.34 = sub int %tmp.32, %a2 ; [#uses=2] + %T = mul int %tmp.34, %tmp.34 + ret int %T +} -- 2.34.1