1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/Transforms/EarlyCSE/pr33406.ll
Davide Italiano 98f62da37e [EarlyCSE] Make PhiToCheck in removeMSSA() a set.
This way we end up not looking at PHI args already removed.
MemSSA now goes through the updater so we can prune
it to avoid having redundant MemoryPHI arguments, but that
doesn't quite work for the general case.

Discussed with Daniel Berlin, fixes PR33406.

llvm-svn: 305409
2017-06-14 19:29:53 +00:00

27 lines
581 B
LLVM

; RUN: opt -early-cse-memssa -S %s | FileCheck %s
; CHECK: define void @patatino() {
; CHECK: for.cond:
; CHECK-NEXT: br i1 true, label %if.end, label %for.inc
; CHECK: if.end:
; CHECK-NEXT: %tinkywinky = load i32, i32* @b
; CHECK-NEXT: br i1 true, label %for.inc, label %for.inc
; CHECK: for.inc:
; CHECK-NEXT: ret void
@b = external global i32
define void @patatino() {
for.cond:
br i1 true, label %if.end, label %for.inc
if.end:
%tinkywinky = load i32, i32* @b
store i32 %tinkywinky, i32* @b
br i1 true, label %for.inc, label %for.inc
for.inc:
ret void
}