[all-commits] [llvm/llvm-project] fa97f6: [GuardWidening] Choose right point for generating ...
Max Kazantsev via All-commits
all-commits at lists.llvm.org
Tue Jan 31 05:11:08 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fa97f63ac63f27045a2bef1892b98300d9e33431
https://github.com/llvm/llvm-project/commit/fa97f63ac63f27045a2bef1892b98300d9e33431
Author: Max Kazantsev <mkazantsev at azul.com>
Date: 2023-01-31 (Tue, 31 Jan 2023)
Changed paths:
M llvm/lib/Transforms/Scalar/GuardWidening.cpp
M llvm/test/Transforms/GuardWidening/basic_widenable_condition_guards.ll
M llvm/test/Transforms/GuardWidening/loop_invariant_widenable_condition.ll
M llvm/test/Transforms/GuardWidening/mixed_guards.ll
M llvm/test/Transforms/GuardWidening/pr60234.ll
M llvm/test/Transforms/GuardWidening/pr60234_recommit.ll
Log Message:
-----------
[GuardWidening] Choose right point for generating wide condition for branches. PR60234. Take 2
There was a crash because there was inconsistency between 'isAvailableAt'
and 'makeAvailableAt' queries. 'makeAvailableAt' is called on conditions
of both guards (dominating and dominated) and 'isAvailableAt' is called
only for dominated guard's condition. Before this patch, it didn't matter
because insertion point always matched the dominating guard. Now, because
they are different, this inconsistency leads to incorrect transforms which
are caught by assert.
The fix is to check 'isAvailableAt' for both conditions.
Differential Revision: https://reviews.llvm.org/D142693
More information about the All-commits
mailing list