[PATCH] D115247: [EarlyCSE] Retain poison flags, if program is UB if poison.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 10 12:21:53 PST 2021


fhahn marked an inline comment as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/EarlyCSE.cpp:1376
+          // instructions.
+          if (I->getType()->isFloatingPointTy() ||
+              !I->hasPoisonGeneratingFlags() || !programUndefinedIfPoison(I))
----------------
nikic wrote:
> This should be checking `isa<FPMathOperator>` instead. It's not necessarily the result type that's a float (e.g. fcmp).
fixed, thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115247



More information about the llvm-commits mailing list