[WebAssembly] Don't perform the returned-argument optimization on constants.
[oota-llvm.git] / test / CodeGen / Generic / pr12507.ll
1 ; RUN: llc < %s
2
3 @c = external global i32, align 4
4
5 define void @foo(i160 %x) {
6 entry:
7   %cmp.i = icmp ne i160 %x, 340282366920938463463374607431768211456
8   %conv.i = zext i1 %cmp.i to i32
9   %tobool.i = icmp eq i32 %conv.i, 0
10   br i1 %tobool.i, label %if.then.i, label %fn1.exit
11
12 if.then.i:
13   store i32 0, i32* @c, align 4
14   br label %fn1.exit
15
16 fn1.exit:
17   ret void
18 }