[llvm] fc16ca7 - [X86] Pre-commit test for pr59305
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 7 08:35:50 PST 2022
Author: Phoebe Wang
Date: 2022-12-08T00:35:42+08:00
New Revision: fc16ca71203030f2208d70932c47d9bd8e2f9014
URL: https://github.com/llvm/llvm-project/commit/fc16ca71203030f2208d70932c47d9bd8e2f9014
DIFF: https://github.com/llvm/llvm-project/commit/fc16ca71203030f2208d70932c47d9bd8e2f9014.diff
LOG: [X86] Pre-commit test for pr59305
Added:
llvm/test/CodeGen/X86/pr59305.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/pr59305.ll b/llvm/test/CodeGen/X86/pr59305.ll
new file mode 100644
index 000000000000..6c6ee99359ff
--- /dev/null
+++ b/llvm/test/CodeGen/X86/pr59305.ll
@@ -0,0 +1,39 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=x86_64-pc-linux < %s | FileCheck %s
+
+define double @foo(double %0) #0 {
+; CHECK-LABEL: foo:
+; CHECK: # %bb.0:
+; CHECK-NEXT: pushq %rax
+; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
+; CHECK-NEXT: movl $1024, %edi # imm = 0x400
+; CHECK-NEXT: callq fesetround at PLT
+; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
+; CHECK-NEXT: divsd (%rsp), %xmm0 # 8-byte Folded Reload
+; CHECK-NEXT: movsd %xmm0, (%rsp) # 8-byte Spill
+; CHECK-NEXT: movl $1024, %edi # imm = 0x400
+; CHECK-NEXT: callq fesetround at PLT
+; CHECK-NEXT: movl $1024, %edi # imm = 0x400
+; CHECK-NEXT: callq fesetround at PLT
+; CHECK-NEXT: movsd (%rsp), %xmm0 # 8-byte Reload
+; CHECK-NEXT: # xmm0 = mem[0],zero
+; CHECK-NEXT: movaps %xmm0, %xmm1
+; CHECK-NEXT: movaps %xmm0, %xmm2
+; CHECK-NEXT: callq fma at PLT
+; CHECK-NEXT: popq %rax
+; CHECK-NEXT: retq
+ %2 = call i32 @fesetround(i32 noundef 1024)
+ %3 = call double @llvm.experimental.constrained.fdiv.f64(double 1.000000e+00, double %0, metadata !"round.dynamic", metadata !"fpexcept.ignore") #0
+ %4 = call i32 @fesetround(i32 noundef 1024)
+ %5 = call double @llvm.experimental.constrained.fdiv.f64(double 1.000000e+00, double %0, metadata !"round.dynamic", metadata !"fpexcept.ignore") #0
+ %6 = call i32 @fesetround(i32 noundef 1024)
+ %7 = call double @llvm.experimental.constrained.fdiv.f64(double 1.000000e+00, double %0, metadata !"round.dynamic", metadata !"fpexcept.ignore") #0
+ %8 = call double @llvm.experimental.constrained.fma.f64(double %3, double %5, double %7, metadata !"round.dynamic", metadata !"fpexcept.ignore") #0
+ ret double %8
+}
+
+declare i32 @fesetround(i32) #0
+declare double @llvm.experimental.constrained.fdiv.f64(double, double, metadata, metadata) #0
+declare double @llvm.experimental.constrained.fma.f64(double, double, double, metadata, metadata) #0
+
+attributes #0 = { nounwind strictfp }
More information about the llvm-commits
mailing list