[PATCH] D157281: ValueTracking: Add computeKnownExponentRange

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 31 12:37:51 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4271
+        Op->getOperand(1), DemandedElts, Depth + 1, Q);
+    KnownLHS |= KnownRHS;
+    return KnownLHS.applyFlags(Q, Op);
----------------
Should this be `intersectWith`?


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4343
+  case Instruction::UIToFP:
+    // TODO: Check from known range of integer.
+    break;
----------------
On the note of TODOs, would also add one for `bitcast` as something like `logicOp` + `bitcast` isn't that uncommon. 


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

https://reviews.llvm.org/D157281



More information about the llvm-commits mailing list