[PATCH] D145008: [ControlHeightReduction] Don't combine a "poison" branch

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 10:12:14 PST 2023


davidxl added a comment.

In D145008#4160793 <https://reviews.llvm.org/D145008#4160793>, @nikic wrote:

> The value may be poison even if it's not literally poison. The problem seems to be that the condition gets swapped. CHR generates `select i1 poison, i1 %arg, i1 false` rather than the correct `select i1 %arg, i1 poison, i1 false`. Either that swapping should not occur (if it's not important to what CHR is doing) or the condition needs to be frozen.

Correct -- kazu@ brought it up before sending the patch as well -- is there existing interface to query for propagated poison?

The swap is triggered because of the profile data says it is profitable -- while it is itself a bug to deal with, it is independent to this fix.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145008



More information about the llvm-commits mailing list