1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
llvm-mirror/test/Transforms/LICM/pr32129.ll
Sanjoy Das 6088441f33 Use a WeakVH for UnknownInstructions in AliasSetTracker
Summary:
This change solves the same problem as D30726, except that this only
throws out the bathwater.

AST was not correctly tracking and deleting UnknownInstructions via
handles.  The existing code only tracks "pointers" in its
`ASTCallbackVH`, so an UnknownInstruction (that isn't also def'ing a
pointer used by another memory instruction) never gets a
`ASTCallbackVH`.

There are two other ways to solve this problem:

 - Use the `PointerRec` scheme for both known and unknown instructions.
 - Use a `CallbackVH` that erases the offending Instruction from the
   UnknownInstruction list.

Both of the above changes seemed to be significantly (and unnecessarily
IMO) more complex than this.

Reviewers: chandlerc, dberlin, hfinkel, reames

Subscribers: mcrosier, llvm-commits

Differential Revision: https://reviews.llvm.org/D30849

llvm-svn: 297539
2017-03-11 01:15:48 +00:00

19 lines
378 B
LLVM

; RUN: opt -S -licm -loop-unswitch -licm < %s | FileCheck %s
declare void @llvm.experimental.guard(i1, ...)
define void @test() {
; CHECK-LABEL: @test(
; CHECK-NOT: guard
entry:
br label %header
header:
br label %loop
loop:
%0 = icmp ult i32 0, 400
call void (i1, ...) @llvm.experimental.guard(i1 %0, i32 9) [ "deopt"() ]
br i1 undef, label %header, label %loop
}