1 change: 1 addition & 0 deletions llvm/test/Transforms/EarlyCSE/edge.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
; RUN: opt -early-cse -S < %s | FileCheck %s
; RUN: opt -basicaa -early-cse-memssa -S < %s | FileCheck %s
; Same as GVN/edge.ll, but updated to reflect EarlyCSE's less powerful
; implementation. EarlyCSE currently doesn't exploit equality comparisons
; against constants.
Expand Down
1 change: 1 addition & 0 deletions llvm/test/Transforms/EarlyCSE/fence.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
; RUN: opt -S -early-cse < %s | FileCheck %s
; RUN: opt < %s -S -basicaa -early-cse-memssa | FileCheck %s
; NOTE: This file is testing the current implementation. Some of
; the transforms used as negative tests below would be legal, but
; only if reached through a chain of logic which EarlyCSE is incapable
Expand Down
1 change: 1 addition & 0 deletions llvm/test/Transforms/EarlyCSE/flags.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
; RUN: opt -early-cse -S < %s | FileCheck %s
; RUN: opt -basicaa -early-cse-memssa -S < %s | FileCheck %s

declare void @use(i1)

Expand Down
1 change: 1 addition & 0 deletions llvm/test/Transforms/EarlyCSE/floatingpoint.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
; RUN: opt < %s -S -early-cse | FileCheck %s
; RUN: opt < %s -S -basicaa -early-cse-memssa | FileCheck %s

; Ensure we don't simplify away additions vectors of +0.0's (same as scalars).
define <4 x float> @fV( <4 x float> %a) {
Expand Down
1 change: 1 addition & 0 deletions llvm/test/Transforms/EarlyCSE/guards.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
; RUN: opt -S -early-cse < %s | FileCheck %s
; RUN: opt < %s -S -basicaa -early-cse-memssa | FileCheck %s

declare void @llvm.experimental.guard(i1,...)

Expand Down
1 change: 1 addition & 0 deletions llvm/test/Transforms/EarlyCSE/instsimplify-dom.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
; RUN: opt -early-cse -S < %s | FileCheck %s
; RUN: opt -basicaa -early-cse-memssa -S < %s | FileCheck %s
; PR12231

declare i32 @f()
Expand Down
1 change: 1 addition & 0 deletions llvm/test/Transforms/EarlyCSE/invariant-loads.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
; RUN: opt -S -early-cse < %s | FileCheck %s
; RUN: opt -S -basicaa -early-cse-memssa < %s | FileCheck %s

declare void @clobber_and_use(i32)

Expand Down
34 changes: 34 additions & 0 deletions llvm/test/Transforms/EarlyCSE/memoryssa.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
; RUN: opt < %s -S -early-cse | FileCheck %s --check-prefix=CHECK-NOMEMSSA
; RUN: opt < %s -S -basicaa -early-cse-memssa | FileCheck %s
; RUN: opt < %s -S -passes='early-cse' | FileCheck %s --check-prefix=CHECK-NOMEMSSA
; RUN: opt < %s -S -aa-pipeline=basic-aa -passes='early-cse-memssa' | FileCheck %s

@G1 = global i32 zeroinitializer
@G2 = global i32 zeroinitializer

;; Simple load value numbering across non-clobbering store.
; CHECK-LABEL: @test1(
; CHECK-NOMEMSSA-LABEL: @test1(
define i32 @test1() {
%V1 = load i32, i32* @G1
store i32 0, i32* @G2
%V2 = load i32, i32* @G1
; CHECK-NOMEMSSA: sub i32 %V1, %V2
%Diff = sub i32 %V1, %V2
ret i32 %Diff
; CHECK: ret i32 0
}

;; Simple dead store elimination across non-clobbering store.
; CHECK-LABEL: @test2(
; CHECK-NOMEMSSA-LABEL: @test2(
define void @test2() {
entry:
%V1 = load i32, i32* @G1
; CHECK: store i32 0, i32* @G2
store i32 0, i32* @G2
; CHECK-NOT: store
; CHECK-NOMEMSSA: store i32 %V1, i32* @G1
store i32 %V1, i32* @G1
ret void
}
1 change: 1 addition & 0 deletions llvm/test/Transforms/EarlyCSE/read-reg.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
; RUN: opt -S -early-cse < %s | FileCheck %s
; RUN: opt -S -basicaa -early-cse-memssa < %s | FileCheck %s
target datalayout = "E-m:e-i64:64-n32:64"
target triple = "powerpc64-unknown-linux-gnu"

Expand Down