[PATCH] D59959: [ConstantRange] Add unsigned and signed intersection type

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 6 07:41:08 PDT 2019


lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.

Hmm, yes, `GetPreferredRange()` did make this more obvious.
I would still prefer to see some Z3 magic, but the tests look reassuring to me.



================
Comment at: llvm/include/llvm/IR/ConstantRange.h:255-256
+  /// with smaller size. "Unsigned" will pick the range that does not wrap in
+  /// the unsigned domain, or if both possibilities wrap or don't wrap, the
+  /// smaller set. "Signed" will instead prefer not wrapping in the signed
+  /// domain. In cases where both ranges have the same size, either may be
----------------
The `or if both possibilities wrap or don't wrap, the smaller set.` is applicable for both the `Unsigned` and `Signed` `IntersectionType`s. Maybe move that phrase to the end, after explaining `Unsigned`?


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

https://reviews.llvm.org/D59959





More information about the llvm-commits mailing list