Added the ability to xfail based on llvmgcc version
[llvm-complete.git] / test / Transforms / InstCombine / 2004-09-20-BadLoadCombine.llx
blob5960135f1bc8843726ce2003235ddb0259a454ac
1 ; RUN: llvm-as < %s | opt -instcombine -mem2reg | llvm-dis | not grep 'int 1'
3 ; When propagating the load through the select, make sure that the load is
4 ; inserted where the original load was, not where the select is.  Not doing
5 ; so could produce incorrect results!
7 implementation
9 int %test(bool %C) {
10         %X = alloca int
11         %X2 = alloca int
12         store int 1, int* %X
13         store int 2, int* %X2
15         %Y = select bool %C, int* %X, int* %X2
16         store int 3, int* %X
17         %Z = load int* %Y
18         ret int %Z