[llvm] [AMDGPU] Legalize 64bit elements for BUILD_VECTOR on gfx942 (PR #145052)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 1 01:14:15 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:
Can you drop this part of the patch and look into this later? You still cannot use v_mov_b64 to materialize a general 64-bit constant. Targets with v_mov_b64 are under-represented in the test suite and this is likely introducing many regressions. Plus, still want the non-constant case that just pushes the cast through build_vector
https://github.com/llvm/llvm-project/pull/145052
More information about the llvm-commits
mailing list