[all-commits] [llvm/llvm-project] 8623da: [DAG] visitFREEZE - generalize freeze(op()) -> op(...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Wed Aug 10 05:13:07 PDT 2022
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2022-08-10 (Wed, 10 Aug 2022)
[DAG] visitFREEZE - generalize freeze(op()) -> op(freeze()) to any number of operands
canCreateUndefOrPoison currently only handles unary ops, but we intend to change that soon - this more closely matches the pushFreezeToPreventPoisonFromPropagating behaviour where the freeze is pushed up to a single operand value, as long as all others are guaranteed not to be poison/undef.
However, pushFreezeToPreventPoisonFromPropagating would freeze all uses of the value - whilst this variant requires the frozen value to be only used in the op - we can look at generalize multiple uses later if the need arises.
More information about the All-commits