[llvm] [DAG] MatchLoadCombine - match swapped loads (PR #167416)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 11 03:52:28 PST 2025
================
@@ -9803,8 +9832,12 @@ SDValue DAGCombiner::MatchLoadCombine(SDNode *N) {
!TLI.isOperationLegal(ISD::BSWAP, VT))
return SDValue();
- // If we need to bswap and zero extend, we have to insert a shift. Check that
- // it is legal.
+ // If we need to rotate make sure that is legal.
+ if (IsRotated && LegalOperations && !TLI.isOperationLegal(ISD::ROTR, VT))
----------------
RKSimon wrote:
we'll either have to not support NeedsZext for rotation cases or add more test coverage - happy with a TODO comment for now
https://github.com/llvm/llvm-project/pull/167416
More information about the llvm-commits
mailing list