[llvm-branch-commits] [llvm-branch] r228790 - Merging r228760 and r228761:
Hans Wennborg
hans at hanshq.net
Tue Feb 10 18:23:00 PST 2015
Author: hans
Date: Tue Feb 10 20:23:00 2015
New Revision: 228790
URL: http://llvm.org/viewvc/llvm-project?rev=228790&view=rev
Log:
Merging r228760 and r228761:
------------------------------------------------------------------------
r228760 | majnemer | 2015-02-10 15:09:43 -0800 (Tue, 10 Feb 2015) | 3 lines
EarlyCSE: It isn't safe to CSE across synchronization boundaries
This fixes PR22514.
------------------------------------------------------------------------
------------------------------------------------------------------------
r228761 | majnemer | 2015-02-10 15:11:02 -0800 (Tue, 10 Feb 2015) | 1 line
EarlyCSE: Add check lines for test added in r228760
------------------------------------------------------------------------
Modified:
llvm/branches/release_36/ (props changed)
llvm/branches/release_36/lib/Transforms/Scalar/EarlyCSE.cpp
llvm/branches/release_36/test/Transforms/EarlyCSE/basic.ll
Propchange: llvm/branches/release_36/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 10 20:23:00 2015
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,226023,226029,226044,226046,226048,226058,226075,226170-226171,226182,226473,226664,226708,226711,226755,226809,227005,227085,227250,227260-227261,227290,227294,227299,227319,227339,227491,227584,227603,227628,227670,227809,227815,227903,227934,227972,227983,228049,228129,228168,228331,228411,228444,228490,228500,228507,228518,228525,228565,228656
+/llvm/trunk:155241,226023,226029,226044,226046,226048,226058,226075,226170-226171,226182,226473,226664,226708,226711,226755,226809,227005,227085,227250,227260-227261,227290,227294,227299,227319,227339,227491,227584,227603,227628,227670,227809,227815,227903,227934,227972,227983,228049,228129,228168,228331,228411,228444,228490,228500,228507,228518,228525,228565,228656,228760-228761
Modified: llvm/branches/release_36/lib/Transforms/Scalar/EarlyCSE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/lib/Transforms/Scalar/EarlyCSE.cpp?rev=228790&r1=228789&r2=228790&view=diff
==============================================================================
--- llvm/branches/release_36/lib/Transforms/Scalar/EarlyCSE.cpp (original)
+++ llvm/branches/release_36/lib/Transforms/Scalar/EarlyCSE.cpp Tue Feb 10 20:23:00 2015
@@ -480,6 +480,9 @@ bool EarlyCSE::processNode(DomTreeNode *
// Ignore volatile loads.
if (!LI->isSimple()) {
LastStore = nullptr;
+ // Don't CSE across synchronization boundaries.
+ if (Inst->mayWriteToMemory())
+ ++CurrentGeneration;
continue;
}
Modified: llvm/branches/release_36/test/Transforms/EarlyCSE/basic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/test/Transforms/EarlyCSE/basic.ll?rev=228790&r1=228789&r2=228790&view=diff
==============================================================================
--- llvm/branches/release_36/test/Transforms/EarlyCSE/basic.ll (original)
+++ llvm/branches/release_36/test/Transforms/EarlyCSE/basic.ll Tue Feb 10 20:23:00 2015
@@ -192,4 +192,13 @@ define void @test11(i32 *%P) {
; CHECK-NEXT: ret void
}
-
+; CHECK-LABEL: @test12(
+define i32 @test12(i1 %B, i32* %P1, i32* %P2) {
+ %load0 = load i32* %P1
+ %1 = load atomic i32* %P2 seq_cst, align 4
+ %load1 = load i32* %P1
+ %sel = select i1 %B, i32 %load0, i32 %load1
+ ret i32 %sel
+ ; CHECK: load i32* %P1
+ ; CHECK: load i32* %P1
+}
More information about the llvm-branch-commits
mailing list