diff options
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.h | 4 | ||||
-rw-r--r-- | llvm/test/CodeGen/X86/fp-logic.ll | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.h b/llvm/lib/Target/X86/X86ISelLowering.h index c6733467a4a..fd6d5f5ae8d 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.h +++ b/llvm/lib/Target/X86/X86ISelLowering.h @@ -758,6 +758,10 @@ namespace llvm { bool isCheapToSpeculateCtlz() const override; + bool hasBitPreservingFPLogic(EVT VT) const override { + return VT == MVT::f32 || VT == MVT::f64 || VT.isVector(); + } + bool hasAndNotCompare(SDValue Y) const override; /// Return the value type to use for ISD::SETCC. diff --git a/llvm/test/CodeGen/X86/fp-logic.ll b/llvm/test/CodeGen/X86/fp-logic.ll index b5f1349cada..9ab6751d654 100644 --- a/llvm/test/CodeGen/X86/fp-logic.ll +++ b/llvm/test/CodeGen/X86/fp-logic.ll @@ -265,8 +265,7 @@ define float @movmsk(float %x) { define double @bitcast_fabs(double %x) { ; CHECK-LABEL: bitcast_fabs: ; CHECK: # BB#0: -; CHECK-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero -; CHECK-NEXT: andpd %xmm1, %xmm0 +; CHECK-NEXT: andpd {{.*}}(%rip), %xmm0 ; CHECK-NEXT: retq ; %bc1 = bitcast double %x to i64 @@ -278,8 +277,7 @@ define double @bitcast_fabs(double %x) { define float @bitcast_fneg(float %x) { ; CHECK-LABEL: bitcast_fneg: ; CHECK: # BB#0: -; CHECK-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero -; CHECK-NEXT: xorps %xmm1, %xmm0 +; CHECK-NEXT: xorps {{.*}}(%rip), %xmm0 ; CHECK-NEXT: retq ; %bc1 = bitcast float %x to i32 |