[PATCH] D84597: [ConstantFolding] Fold freeze if it is never undef or poison
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 26 05:46:19 PDT 2020
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:1073
+ case Instruction::Freeze:
+ return isGuaranteedNotToBeUndefOrPoison(Ops[0]) ? Ops[0] : nullptr;
case Instruction::ICmp:
----------------
I'd move this below the llvm_unreachable case for compares.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84597/new/
https://reviews.llvm.org/D84597
More information about the llvm-commits
mailing list