[PATCH] D63385: [ConstantFolding] Add constant folding for smul.fix and smul.fix.sat

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 19 09:43:35 PDT 2019


nikic added inline comments.


================
Comment at: llvm/trunk/lib/Analysis/ConstantFolding.cpp:2205
+    if (const auto *Op2 = dyn_cast<ConstantInt>(Operands[1])) {
+      if (const auto *Op3 = dyn_cast<ConstantInt>(Operands[2])) {
+        switch (IntrinsicID) {
----------------
As a possible follow-up cleanup, this can be merged into the fshl/fshr code below. The smul_fix case could bail out if C0, C1 or C2 are null (or handle them, if there is interest to support undef operands).


Repository:
  rL LLVM

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

https://reviews.llvm.org/D63385





More information about the llvm-commits mailing list