llvm-6502/test/Transforms/InstCombine/2004-09-20-BadLoadCombine.llx
Reid Spencer 2b544beda3 For PR1319:
Upgrade tests to work with new llvm.exp version of llvm_runtest.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36013 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 20:13:02 +00:00

22 lines
530 B
Plaintext

; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -mem2reg | llvm-dis | \
; RUN: not grep {int 1}
; When propagating the load through the select, make sure that the load is
; inserted where the original load was, not where the select is. Not doing
; so could produce incorrect results!
implementation
int %test(bool %C) {
%X = alloca int
%X2 = alloca int
store int 1, int* %X
store int 2, int* %X2
%Y = select bool %C, int* %X, int* %X2
store int 3, int* %X
%Z = load int* %Y
ret int %Z
}