[all-commits] [llvm/llvm-project] 735e6c: [MergeICmps] Fix missing split.
Clement Courbet via All-commits
all-commits at lists.llvm.org
Tue Dec 1 08:29:45 PST 2020
Branch: refs/heads/temp-test-main
Home: https://github.com/llvm/llvm-project
Commit: 735e6c888ec8d647609d242a165e3631423a709d
https://github.com/llvm/llvm-project/commit/735e6c888ec8d647609d242a165e3631423a709d
Author: Clement Courbet <courbet at google.com>
Date: 2020-12-01 (Tue, 01 Dec 2020)
Changed paths:
M llvm/lib/Transforms/Scalar/MergeICmps.cpp
A llvm/test/Transforms/MergeICmps/X86/gep-references-bb.ll
Log Message:
-----------
[MergeICmps] Fix missing split.
We were not correctly splitting a blocks for chains of length 1.
Before that change, additional instructions for blocks in chains of
length 1 were not split off from the block before removing (this was
done correctly for chains of longer size).
If this first block contained an instruction referenced elsewhere,
deleting the block, would result in invalidation of the produced value.
This caused a miscompile which motivated D92297 (before D17993,
nonnull and dereferenceable attributed were not added so MergeICmps were
not triggered.) The new test gep-references-bb.ll demonstrate the issue.
The regression was introduced in
rG0efadbbcdeb82f5c14f38fbc2826107063ca48b2.
This supersedes D92364.
Test case by MaskRay (Fangrui Song).
Differential Revision: https://reviews.llvm.org/D92375
More information about the All-commits
mailing list