xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/zero-remat.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; REQUIRES: asserts
2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86-64 | FileCheck %s --check-prefix=CHECK-64
3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86-64 -o /dev/null -stats  -info-output-file - | grep asm-printer  | grep 12
4*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86 | FileCheck %s --check-prefix=CHECK-32
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Workerdeclare void @bar(double %x)
7*9880d681SAndroid Build Coastguard Workerdeclare void @barf(float %x)
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Workerdefine double @foo() nounwind {
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker  call void @bar(double 0.0)
12*9880d681SAndroid Build Coastguard Worker  ret double 0.0
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker;CHECK-32-LABEL: foo:
15*9880d681SAndroid Build Coastguard Worker;CHECK-32: call
16*9880d681SAndroid Build Coastguard Worker;CHECK-32: fldz
17*9880d681SAndroid Build Coastguard Worker;CHECK-32: ret
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker;CHECK-64-LABEL: foo:
20*9880d681SAndroid Build Coastguard Worker;CHECK-64: xorps
21*9880d681SAndroid Build Coastguard Worker;CHECK-64: call
22*9880d681SAndroid Build Coastguard Worker;CHECK-64: xorps
23*9880d681SAndroid Build Coastguard Worker;CHECK-64: ret
24*9880d681SAndroid Build Coastguard Worker}
25*9880d681SAndroid Build Coastguard Worker
26*9880d681SAndroid Build Coastguard Worker
27*9880d681SAndroid Build Coastguard Workerdefine float @foof() nounwind {
28*9880d681SAndroid Build Coastguard Worker  call void @barf(float 0.0)
29*9880d681SAndroid Build Coastguard Worker  ret float 0.0
30*9880d681SAndroid Build Coastguard Worker
31*9880d681SAndroid Build Coastguard Worker;CHECK-32-LABEL: foof:
32*9880d681SAndroid Build Coastguard Worker;CHECK-32: call
33*9880d681SAndroid Build Coastguard Worker;CHECK-32: fldz
34*9880d681SAndroid Build Coastguard Worker;CHECK-32: ret
35*9880d681SAndroid Build Coastguard Worker
36*9880d681SAndroid Build Coastguard Worker;CHECK-64-LABEL: foof:
37*9880d681SAndroid Build Coastguard Worker;CHECK-64: xorps
38*9880d681SAndroid Build Coastguard Worker;CHECK-64: call
39*9880d681SAndroid Build Coastguard Worker;CHECK-64: xorps
40*9880d681SAndroid Build Coastguard Worker;CHECK-64: ret
41*9880d681SAndroid Build Coastguard Worker}
42