[PATCH] D66300: [TargetLowering] x s% C == 0 fold: vector divisor with INT_MIN handling

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 05:45:36 PDT 2019


RKSimon added a comment.

a couple of minor comments



================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:5134
+    // If the divisor is 1 the result can be constant-folded. Similarly,
+    // we don't about INT_MIN lanes, those can be set to undef if appropriate.
     if (D.isOneValue()) {
----------------
typo: we don't care about


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:5230
+
+  if (HadIntMinDivisor) {
+    assert(VT.isVector() && "Should only get here for vectors.");
----------------
(style) early out for non HadIntMinDivisor:
```
if (!HadIntMinDivisor)
  return Res;
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66300





More information about the llvm-commits mailing list