Add a test case for (store (op (load ..) ..) ..) folding.
[oota-llvm.git] / test / CodeGen / X86 / store_op_load_fold.ll
1 ; RUN: llvm-as < %s | llc -march=x86 | not grep 'mov'
2 ;
3 ; Test the add and load are folded into the store instruction.
4
5 %X = weak global short 0
6
7 void %foo() {
8         %tmp.0 = load short* %X
9         %tmp.3 = add short %tmp.0, 329
10         store short %tmp.3, short* %X
11         ret void
12 }