[llvm] [AMDGPU] Do not treat bitcast across FP types as canonicality-preserving (PR #203560)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 30 00:57:33 PDT 2026
================
@@ -15643,8 +15643,17 @@ SDValue SITargetLowering::performRcpCombine(SDNode *N,
}
bool SITargetLowering::isCanonicalized(SelectionDAG &DAG, SDValue Op,
- SDNodeFlags UserFlags,
- unsigned MaxDepth) const {
+ SDNodeFlags UserFlags, unsigned MaxDepth,
+ EVT QueryVT) const {
+ EVT VT = Op.getValueType();
+ if (VT.isFloatingPoint()) {
+ EVT ScalarVT = VT.getScalarType();
+ if (QueryVT == EVT())
+ QueryVT = ScalarVT;
----------------
arsenm wrote:
I think I'd prefer a separate overload which omits the QueryVT and assumes the origin value's type
https://github.com/llvm/llvm-project/pull/203560
More information about the llvm-commits
mailing list