[all-commits] [llvm/llvm-project] c9e704: [JumpThreading] Look through freeze in getPredicat...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Wed May 18 03:10:17 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c9e7049754ac94a952de8ac6962c36f844e43b3c
https://github.com/llvm/llvm-project/commit/c9e7049754ac94a952de8ac6962c36f844e43b3c
Author: Nikita Popov <npopov at redhat.com>
Date: 2022-05-18 (Wed, 18 May 2022)
Changed paths:
M llvm/lib/Transforms/Scalar/JumpThreading.cpp
M llvm/test/Transforms/JumpThreading/freeze.ll
M llvm/test/Transforms/JumpThreading/select-unfold-freeze.ll
Log Message:
-----------
[JumpThreading] Look through freeze in getPredicateAt() fold
This code is valid for any icmp, so we can safely look through a
freeze when trying to find one.
A caveat here is that replaceFoldableUses() may not end up replacing
any uses in this case. It might make sense to use the freeze as the
context instruction (rather than the terminator) if there is a
freeze, to ensure that it always gets folded. This would require
some changes to how replaceFoldedUses() works though, as it
currently assumes that the value is valid at the end of the block.
More information about the All-commits
mailing list