[PATCH] D156449: [LLVM][Transforms]

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 09:29:33 PDT 2023


craig.topper added a comment.

Please upload with full context. It's impossible to review most of these changes in the web view otherwise.



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:413
+    auto *ZExtInst = CastInst::Create(Instruction::ZExt, And, Ty);
+    ZExtInst->setWasSext(true);
+    return ZExtInst;
----------------
I don't think this is correct.

`was_sext` is supposed to indicate that the sign bit of the input to the zext is known to be 0. Making the zext and sext equivalent. In this case the input is only a single bit, making the input only a sign bit. It is not known to be 0.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156449



More information about the llvm-commits mailing list