From: Chris Lattner Date: Fri, 25 Jun 2004 07:47:13 +0000 (+0000) Subject: New testcase for constant expression lowering pass, contributed by Vladimir Prus! X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=dfde14ef5a68dcc0aae568524813090c0768c370;p=oota-llvm.git New testcase for constant expression lowering pass, contributed by Vladimir Prus! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14398 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/Generic/ConstantExprLowering.llx b/test/CodeGen/Generic/ConstantExprLowering.llx new file mode 100644 index 00000000000..49002ad04e5 --- /dev/null +++ b/test/CodeGen/Generic/ConstantExprLowering.llx @@ -0,0 +1,26 @@ +; RUN: llvm-as < %s | opt -lowerconstantexprs -disable-output + +%.str_1 = internal constant [16 x sbyte] c"%d %d %d %d %d\0A\00" + +%XA = external global int +%XB = external global int + +implementation ; Functions: + +declare int %printf(sbyte*, ...) + +void %test(int %A, int %B, int %C, int %D) { +entry: + %t1 = setlt int %A, 0 + br bool %t1, label %less, label %not_less +less: + br label %not_less +not_less: + %t2 = phi int [ sub ( int cast (int* %XA to int), + int cast (int* %XB to int) ), %less], + [ sub ( int cast (int* %XA to int), + int cast (int* %XB to int) ), %entry] + %tmp.39 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([16 x sbyte]* %.str_1, long 0, long 0) ) ; [#uses=0] + ret void +} +