[llvm] 5b0f703 - Revert "[ARM][FPEnv] Lowering of fpenv intrinsics"
Serge Pavlov via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 10 01:25:38 PST 2023
Author: Serge Pavlov
Date: 2023-11-10T16:24:51+07:00
New Revision: 5b0f703918064c6691d58bcdf8f98f26de056811
URL: https://github.com/llvm/llvm-project/commit/5b0f703918064c6691d58bcdf8f98f26de056811
DIFF: https://github.com/llvm/llvm-project/commit/5b0f703918064c6691d58bcdf8f98f26de056811.diff
LOG: Revert "[ARM][FPEnv] Lowering of fpenv intrinsics"
This reverts commit d62f040418bd167d1ddd2b79c640a90c0c2ea353.
Some cuda buildbots start failing.
Added:
Modified:
llvm/include/llvm/Target/TargetSelectionDAG.td
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMInstrVFP.td
llvm/test/CodeGen/ARM/fpenv.ll
Removed:
################################################################################
diff --git a/llvm/include/llvm/Target/TargetSelectionDAG.td b/llvm/include/llvm/Target/TargetSelectionDAG.td
index 798e6a1d9525e21..fa5761c3a199a56 100644
--- a/llvm/include/llvm/Target/TargetSelectionDAG.td
+++ b/llvm/include/llvm/Target/TargetSelectionDAG.td
@@ -617,9 +617,6 @@ def strict_uint_to_fp : SDNode<"ISD::STRICT_UINT_TO_FP",
def strict_fsetcc : SDNode<"ISD::STRICT_FSETCC", SDTSetCC, [SDNPHasChain]>;
def strict_fsetccs : SDNode<"ISD::STRICT_FSETCCS", SDTSetCC, [SDNPHasChain]>;
-def get_fpenv : SDNode<"ISD::GET_FPENV", SDTGetFPStateOp, [SDNPHasChain]>;
-def set_fpenv : SDNode<"ISD::SET_FPENV", SDTSetFPStateOp, [SDNPHasChain]>;
-def reset_fpenv : SDNode<"ISD::RESET_FPENV", SDTNone, [SDNPHasChain]>;
def get_fpmode : SDNode<"ISD::GET_FPMODE", SDTGetFPStateOp, [SDNPHasChain]>;
def set_fpmode : SDNode<"ISD::SET_FPMODE", SDTSetFPStateOp, [SDNPHasChain]>;
def reset_fpmode : SDNode<"ISD::RESET_FPMODE", SDTNone, [SDNPHasChain]>;
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 9d92e5ab36622d9..45d04c0669aea06 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -1411,9 +1411,6 @@ ARMTargetLowering::ARMTargetLowering(const TargetMachine &TM,
setOperationAction(ISD::BITCAST, MVT::i64, Custom);
setOperationAction(ISD::GET_ROUNDING, MVT::i32, Custom);
setOperationAction(ISD::SET_ROUNDING, MVT::Other, Custom);
- setOperationAction(ISD::GET_FPENV, MVT::i32, Legal);
- setOperationAction(ISD::SET_FPENV, MVT::i32, Legal);
- setOperationAction(ISD::RESET_FPENV, MVT::Other, Legal);
}
// We want to custom lower some of our intrinsics.
diff --git a/llvm/lib/Target/ARM/ARMInstrVFP.td b/llvm/lib/Target/ARM/ARMInstrVFP.td
index 7898972ee27869e..5d940cc29af8a77 100644
--- a/llvm/lib/Target/ARM/ARMInstrVFP.td
+++ b/llvm/lib/Target/ARM/ARMInstrVFP.td
@@ -2670,11 +2670,6 @@ def : Pat<(f32 (vfp_f32f16imm:$imm)),
let Predicates = [HasFullFP16];
}
-// Floating-point environment management.
-def : Pat<(get_fpenv), (VMRS)>;
-def : Pat<(set_fpenv GPRnopc:$Rt), (VMSR GPRnopc:$Rt)>;
-def : Pat<(reset_fpenv), (VMSR 0)>;
-
//===----------------------------------------------------------------------===//
// Assembler aliases.
//
diff --git a/llvm/test/CodeGen/ARM/fpenv.ll b/llvm/test/CodeGen/ARM/fpenv.ll
index f5c6a9608bac095..aebbdfd3945a516 100644
--- a/llvm/test/CodeGen/ARM/fpenv.ll
+++ b/llvm/test/CodeGen/ARM/fpenv.ll
@@ -79,16 +79,6 @@ entry:
ret i32 %fpenv
}
-define i32 @get_fpenv_02() nounwind {
-; CHECK-LABEL: get_fpenv_02:
-; CHECK: @ %bb.0: @ %entry
-; CHECK-NEXT: vmrs r0, fpscr
-; CHECK-NEXT: mov pc, lr
-entry:
- %fpenv = call i32 @llvm.get.fpenv.i32()
- ret i32 %fpenv
-}
-
define void @set_fpenv_01(i32 %fpenv) #0 {
; CHECK-LABEL: set_fpenv_01:
; CHECK: @ %bb.0: @ %entry
@@ -107,16 +97,6 @@ entry:
ret void
}
-define void @set_fpenv_02(i32 %fpenv) nounwind {
-; CHECK-LABEL: set_fpenv_02:
-; CHECK: @ %bb.0: @ %entry
-; CHECK-NEXT: vmsr fpscr, r0
-; CHECK-NEXT: mov pc, lr
-entry:
- call void @llvm.set.fpenv.i32(i32 %fpenv)
- ret void
-}
-
define void @reset_fpenv_01() #0 {
; CHECK-LABEL: reset_fpenv_01:
; CHECK: @ %bb.0: @ %entry
@@ -131,16 +111,6 @@ entry:
ret void
}
-define void @reset_fpenv_02() nounwind {
-; CHECK-LABEL: reset_fpenv_02:
-; CHECK: @ %bb.0: @ %entry
-; CHECK-NEXT: vmsr fpscr, #0
-; CHECK-NEXT: mov pc, lr
-entry:
- call void @llvm.reset.fpenv()
- ret void
-}
-
attributes #0 = { nounwind "use-soft-float"="true" }
declare void @llvm.set.rounding(i32)
More information about the llvm-commits
mailing list