[PATCH] D116322: [Analysis] allow caller to choose signed/unsigned when computing constant range

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 4 07:16:02 PST 2022


anna added a comment.

@spatel: inline comment added about incorrect arguments for one of the callsites. Pls fix.



================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:7149
+      ConstantRange RHS =
+          computeConstantRange(Cmp->getOperand(1), UseInstrInfo,
+                               /* ForSigned */ false, AC, I, DT, Depth + 1);
----------------
just noticed this while reading the code. The bool arguments are swapped here. Should be:
```
computeConstantRange(Cmp->getOperand(1), /* ForSigned */ false, UseInstrInfo, AC, I, DT, Depth + 1);
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116322



More information about the llvm-commits mailing list