[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
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8623da5f748bc36fc78fa148fd34332d386533ea
https://github.com/llvm/llvm-project/commit/8623da5f748bc36fc78fa148fd34332d386533ea
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2022-08-10 (Wed, 10 Aug 2022)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Log Message:
-----------
[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
mailing list