xref: /llvm-project/llvm/test/CodeGen/X86/remat-constant.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=x86_64-linux -relocation-model=static | FileCheck %s
3
4declare void @bar() nounwind
5
6@a = external dso_local constant float
7
8declare void @qux(float %f) nounwind
9
10define void @foo() nounwind  {
11; CHECK-LABEL: foo:
12; CHECK:       # %bb.0:
13; CHECK-NEXT:    pushq %rax
14; CHECK-NEXT:    callq bar@PLT
15; CHECK-NEXT:    movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
16; CHECK-NEXT:    callq qux@PLT
17; CHECK-NEXT:    movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
18; CHECK-NEXT:    callq qux@PLT
19; CHECK-NEXT:    popq %rax
20; CHECK-NEXT:    retq
21  %f = load float, ptr @a
22  call void @bar()
23  call void @qux(float %f)
24  call void @qux(float %f)
25  ret void
26}
27