zpu: managed to compile program that writes constant to global variable
[llvm/zpu.git] / test / CodeGen / X86 / store_op_load_fold.ll
blob6e47eb397d1dfd9735f0ff22d97ef0debd1d8f19
1 ; RUN: llc < %s -march=x86 | not grep mov
3 ; Test the add and load are folded into the store instruction.
5 @X = internal global i16 0              ; <i16*> [#uses=2]
7 define void @foo() nounwind {
8         %tmp.0 = load i16* @X           ; <i16> [#uses=1]
9         %tmp.3 = add i16 %tmp.0, 329            ; <i16> [#uses=1]
10         store i16 %tmp.3, i16* @X
11         ret void