[llvm] [AMDGPU] Legalize 64bit elements for BUILD_VECTOR on gfx942 (PR #145052)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 30 03:50:37 PDT 2025
================
@@ -16037,6 +16165,14 @@ SDValue SITargetLowering::PerformDAGCombine(SDNode *N,
return performInsertVectorEltCombine(N, DCI);
case ISD::FP_ROUND:
return performFPRoundCombine(N, DCI);
+ case ISD::BITCAST: {
+ // Avoid undoing build_vector with 64b elements if subtarget supports 64b
+ // movs (i.e., avoid inf loop through combines).
+ const GCNSubtarget *ST = getSubtarget();
+ if (ST->hasMovB64())
+ return SDValue();
+ break;
----------------
arsenm wrote:
Something about this seems off; can you keep this logic in terms of the BUILD_VECTOR legality directly in the BITCAST combine implementation
https://github.com/llvm/llvm-project/pull/145052
More information about the llvm-commits
mailing list