[PATCH] D72930: [FEnv] Constfold some unary constrained operations

Evandro Menezes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 13 12:15:12 PST 2020


evandro added inline comments.


================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:1407
   switch (F->getIntrinsicID()) {
   case Intrinsic::fabs:
   case Intrinsic::minnum:
----------------
Should these cases be true even when `isStrictFP()` is true?


================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:1479
   case Intrinsic::x86_avx512_cvttsd2usi64:
   case Intrinsic::is_constant:
+  case Intrinsic::experimental_constrained_ceil:
----------------
Or should...


```
return !Call->isStrictFP();
```

be inserted here?


================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:2526
                                  const TargetLibraryInfo *TLI) {
-  if (Call->isNoBuiltin() || Call->isStrictFP())
+  if (Call->isNoBuiltin())
     return nullptr;
----------------
Again, not sure about the impact of doing this...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72930





More information about the llvm-commits mailing list