1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
Daniil Suchkov 28be2c09b1 [SSAUpdater] Don't call ValueIsRAUWd upon single use replacement
It is incorrect to call ValueHandleBase::ValueIsRAUWd when only one use
is replaced since it simply violates semantics of the callback and leads
to bugs like PR44320.

Previously this call was used specifically to keep LICM's cache of
AliasSetTrackers up to date across passes (as PR36801 showed, even for
that purpose it didn't work properly), but since LICM doesn't have that
cache anymore, we can safely remove this incorrect call with no
repercussions.

This patch fixes https://bugs.llvm.org/show_bug.cgi?id=44320

Reviewers: asbirlea, fhahn, efriedma, reames

Reviewed-By: asbirlea

Differential Revision: https://reviews.llvm.org/D73089
2020-01-23 15:53:53 +07:00

56 lines
1.1 KiB
LLVM

; RUN: opt -passes="verify<scalar-evolution>,lcssa,verify<scalar-evolution>" -verify-scev-strict -S -disable-output %s
; The first SCEV verification is required because it queries SCEV and populates
; SCEV caches. Second SCEV verification checks if the caches are in valid state.
; Check that the second SCEV verification doesn't fail.
define void @test(i32* %arg, i32* %arg1, i1 %arg2, i1 %arg3) {
bb:
br label %bb6
bb5:
br label %bb6
bb6:
br label %bb7
bb7:
%tmp = load i32, i32* %arg
%tmp8 = load i32, i32* %arg1
%tmp9 = add i32 %tmp8, %tmp
%tmp10 = icmp sgt i32 %tmp9, %tmp
br i1 %tmp10, label %bb11, label %bb17
bb11:
br i1 %arg3, label %bb12, label %bb14
bb12:
br label %bb13
bb13:
br label %bb17
bb14:
br label %bb15
bb15:
%tmp16 = add nsw i32 %tmp, 1
ret void
bb17:
%tmp18 = phi i32 [ 0, %bb7 ], [ %tmp8, %bb13 ]
br i1 %arg2, label %bb24, label %bb19
bb19:
br label %bb20
bb20:
%tmp21 = phi i32 [ %tmp22, %bb20 ], [ 0, %bb19 ]
%tmp22 = add nuw nsw i32 %tmp21, 1
%tmp23 = icmp slt i32 %tmp22, %tmp18
br i1 %tmp23, label %bb20, label %bb5
bb24:
ret void
}