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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 10 08:14:15 PST 2021


spatel added a comment.

In D115247#3178708 <https://reviews.llvm.org/D115247#3178708>, @nikic wrote:

>> Note that the code as written assumes that an instruction cannot have
>> poison-generating flags and fast-math flags, but I am not sure this is
>> always true. Should we add a version of andIRFlags that selectively
>> allows AND'ing fast-math flags only?
>
> Yes, I think so. Or more specifically, to only and the non-poison-generating flags. There are some FMF that are poison generating, but we don't currently treat them as such in various "poison generating" queries. If that changed in the future, we should still handle it correctly.

We have a few poison-related patches in progress currently, so there may be some interaction between these:
D115460 <https://reviews.llvm.org/D115460> would add ninf/nnan to the list of poison-generating flags.
D115526 <https://reviews.llvm.org/D115526> would remove a demanded elements restriction for propagation of flags


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