[PATCH] D151659: Constant propogation through freeze instruction
Mikhail Gudim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 29 14:24:52 PDT 2023
mgudim added a comment.
@nikic Thanks for taking a look!
My understanding is that if the argument of `freeze` instruction is `undef` then `V0State.isUnknownOrUndef()` will return `true` and we exit. In the value lattice `undef` and `constant` are separate states (`llvm-project/llvm/include/llvm/Analysis/ValueLattice.h : 45`)
Also, the test checks that freeze instructions with `undef` argument remain untouched `%fr = freeze i32 undef` - the test passed with my change.
I have also tested with poison: the instruction `%fr = freeze i32 poison` remains untouched. Does this look right? Or am I still misunderstanding?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151659/new/
https://reviews.llvm.org/D151659
More information about the llvm-commits
mailing list