[PATCH] D115247: [EarlyCSE] Retain poison flags, if program is UB if poison.
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 10 11:59:01 PST 2021
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/EarlyCSE.cpp:1376
+ // instructions.
+ if (I->getType()->isFloatingPointTy() ||
+ !I->hasPoisonGeneratingFlags() || !programUndefinedIfPoison(I))
----------------
This should be checking `isa<FPMathOperator>` instead. It's not necessarily the result type that's a float (e.g. fcmp).
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