[llvm] [DAGCombiner][AMDGPU] Track signedness in ByteProviders (PR #65995)

Jeffrey Byrnes via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 07:33:39 PDT 2023


================
@@ -10558,11 +10562,15 @@ calculateSrcByte(const SDValue Op, uint64_t DestByte, uint64_t SrcIndex = 0,
 
     SrcIndex += BitShift / 8;
 
-    return calculateSrcByte(Op->getOperand(0), DestByte, SrcIndex, Depth + 1);
+    return calculateSrcByte(Op->getOperand(0), DestByte, SrcIndex, IsSigned,
+                            Depth + 1);
   }
 
   default: {
-    return ByteProvider<SDValue>::getSrc(Op, DestByte, SrcIndex);
+    if (auto L = dyn_cast<LoadSDNode>(Op))
----------------
jrbyrnes wrote:

I'm not convinced we should be combining atomics to begin with.

I've blacklisted atomics / memtrinsic until we have a better idea of how to handle the signedness of such. Primarily `isMemIntrinsic` will need to be handled as these should be supported ByteProviders.

https://github.com/llvm/llvm-project/pull/65995


More information about the llvm-commits mailing list