[llvm] Always use TargetConstant for FP_ROUND ISD Nodes
authorDavid Truby <david.truby@arm.com>
Wed, 3 Aug 2022 12:39:48 +0000 (13:39 +0100)
committerDavid Truby <david.truby@arm.com>
Wed, 3 Aug 2022 13:02:11 +0000 (14:02 +0100)
commit9a976f36615dbe15e76c12b22f711b2e597a8e51
tree2bda5834f7abdf983eb209520f71965bbae33664
parent28f12a09ae631885410d7524f7c60748a59358c5
[llvm] Always use TargetConstant for FP_ROUND ISD Nodes

This patch ensures consistency in the construction of FP_ROUND nodes
such that they always use ISD::TargetConstant instead of ISD::Constant.

This additionally fixes a bug in the AArch64 SVE backend where patterns
were matching against TargetConstant nodes and sometimes failing when
passed a Constant node.

Reviewed By: paulwalker-arm

Differential Revision: https://reviews.llvm.org/D130370
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/AArch64/sve-fcopysign.ll