From baefa33c2663a64e4d9b70194c04c3613b08cb9f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 20 Aug 2003 16:11:05 +0000 Subject: [PATCH] New testcase for GEP folding git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7982 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../2003-08-20-ConstantExprGEP-Fold.llx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/Assembler/2003-08-20-ConstantExprGEP-Fold.llx diff --git a/test/Assembler/2003-08-20-ConstantExprGEP-Fold.llx b/test/Assembler/2003-08-20-ConstantExprGEP-Fold.llx new file mode 100644 index 000000000000..ab0927c758e5 --- /dev/null +++ b/test/Assembler/2003-08-20-ConstantExprGEP-Fold.llx @@ -0,0 +1,18 @@ +; RUN: as < %s | opt -instcombine -simplifycfg | dis | not grep br + +%.str_1 = internal constant [6 x sbyte] c"_Bool\00" ; <[6 x sbyte]*> [#uses=1] + +implementation + +int %test() { + %tmp.54 = load sbyte* getelementptr (sbyte* getelementptr ([6 x sbyte]* %.str_1, long 0, long 0), long 1) + ; [#uses=1] + %tmp.55 = setne sbyte %tmp.54, 66 ; [#uses=1] + br bool %tmp.55, label %then.7, label %endif.7 +then.7: + br label %then.7 +endif.7: + ret int 0 + +} +