[llvm] [X86] Don't rely on global -fp-contract=fast on X86 CodeGen tests (PR #158026)

Mikołaj Piróg via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 16 06:59:48 PDT 2025


================
@@ -10,10 +10,10 @@ define float @sqrt_ieee(float %f) #0 {
   ; CHECK-NEXT: {{  $}}
   ; CHECK-NEXT:   [[COPY:%[0-9]+]]:fr32 = COPY $xmm0
   ; CHECK-NEXT:   [[DEF:%[0-9]+]]:fr32 = IMPLICIT_DEF
-  ; CHECK-NEXT:   [[VSQRTSSr:%[0-9]+]]:fr32 = nofpexcept VSQRTSSr killed [[DEF]], [[COPY]], implicit $mxcsr
+  ; CHECK-NEXT:   [[VSQRTSSr:%[0-9]+]]:fr32 = contract nofpexcept VSQRTSSr killed [[DEF]], [[COPY]], implicit $mxcsr
   ; CHECK-NEXT:   $xmm0 = COPY [[VSQRTSSr]]
   ; CHECK-NEXT:   RET 0, $xmm0
-  %call = tail call float @llvm.sqrt.f32(float %f)
+  %call = tail call contract float @llvm.sqrt.f32(float %f)
----------------
mikolaj-pirog wrote:

It seems like `fast` on `fdiv` propagates fastmath flags even though the `sqrt` node hasn't any. I've dropped this file from this pr and I'm looking further into this

https://github.com/llvm/llvm-project/pull/158026


More information about the llvm-commits mailing list