Added a (store (op (load ...) ...) ...) folding test case.
[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 target triple = "i686-pc-linux-gnu"
6
7 %X = weak global short 0
8
9 void %foo() {
10         %tmp.0 = load short* %X
11         %tmp.3 = add short %tmp.0, 329
12         store short %tmp.3, short* %X
13         ret void
14 }