[PATCH] D112298: [InstCombine] Generalize sadd.sat combine to compute sign bits.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 4 05:30:31 PDT 2021


lebedev.ri added a comment.

Thank you,
Is this the full diff against main, looks incomplete?



================
Comment at: llvm/include/llvm/Transforms/InstCombine/InstCombiner.h:488-489
+                                const Instruction *CxtI = nullptr) const {
+    unsigned SignedBits = ComputeNumSignBits(Op, Depth, CxtI);
+    return Op->getType()->getScalarSizeInBits() - SignedBits + 1;
+  }
----------------



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112298/new/

https://reviews.llvm.org/D112298



More information about the llvm-commits mailing list