[Mlir-commits] [clang] [llvm] [mlir] [APInt] Assert correct values in APInt constructor (PR #80309)

Craig Topper llvmlistbot at llvm.org
Thu Aug 15 11:27:10 PDT 2024


================
@@ -2142,7 +2142,9 @@ ScheduleDAGSDNodes *SelectionDAGISel::CreateScheduler() {
 bool SelectionDAGISel::CheckAndMask(SDValue LHS, ConstantSDNode *RHS,
                                     int64_t DesiredMaskS) const {
   const APInt &ActualMask = RHS->getAPIntValue();
-  const APInt &DesiredMask = APInt(LHS.getValueSizeInBits(), DesiredMaskS);
+  // TODO: Avoid implicit trunc?
----------------
topperc wrote:

I think this issue exists in CheckOrMask too, but it isn't tested in tree.

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


More information about the Mlir-commits mailing list