35 lines · plain
1; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s2; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s3 4; CodeGen should remat the zero instead of spilling it.5 6declare void @foo(i64 %p)7 8; CHECK-LABEL: bar:9; CHECK: xorl %e[[A0:di|cx]], %e10; CHECK: xorl %e[[A0]], %e[[A0]]11define void @bar() nounwind {12 call void @foo(i64 0)13 call void @foo(i64 0)14 ret void15}16 17; CHECK-LABEL: bat:18; CHECK: movq $-1, %r[[A0]]19; CHECK: movq $-1, %r[[A0]]20define void @bat() nounwind {21 call void @foo(i64 -1)22 call void @foo(i64 -1)23 ret void24}25 26; CHECK-LABEL: bau:27; CHECK: movl $1, %e[[A0]]28; CHECK: movl $1, %e[[A0]]29define void @bau() nounwind {30 call void @foo(i64 1)31 call void @foo(i64 1)32 ret void33}34 35