[llvm] [SCEV] Don't use non-deterministic constant folding for trip counts (PR #90942)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri May 3 01:45:46 PDT 2024


================
@@ -68,9 +68,15 @@ Constant *ConstantFoldConstant(const Constant *C, const DataLayout &DL,
 /// fold instructions like loads and stores, which have no constant expression
 /// form.
 ///
+/// In some cases, constant folding may return one value chosen from a set of
+/// multiple legal return values. Using such a result is usually only valid if
----------------
fhahn wrote:

Might be worth mentioning the NaN case as example?

https://github.com/llvm/llvm-project/pull/90942


More information about the llvm-commits mailing list