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

Jeffrey Byrnes via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 15:19:11 PDT 2023


================
@@ -61,13 +66,17 @@ template <typename ISelOp> class ByteProvider {
   // DestOffset
   int64_t SrcOffset = 0;
 
+  // Tracks whether or not the byte is treated as a signed operand -- useful
+  // for arithmetic combines.
----------------
jrbyrnes wrote:

It is a flag telling the client how to create an instruction which reads the contained SDValue.

For the clients that use ByteProvider for vectorized arithmetic reduction instructions, it is relevant. These instructions typically involve a widening of type, and the IsSigned flag determines whether to use Sext or Zext. This information may only be present in the tree itself, and not in the ultimate source or top-level instruction.

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


More information about the llvm-commits mailing list