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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 12:39:50 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.
+  bool IsSigned = 0;
+
   ByteProvider() = default;
 
   static ByteProvider getSrc(std::optional<ISelOp> Val, int64_t ByteOffset,
-                             int64_t VectorOffset) {
+                             int64_t VectorOffset, bool IsSigned = 0) {
----------------
arsenm wrote:

= false

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


More information about the llvm-commits mailing list