mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
76f4df50c3
Summary: The instructions SeenExprs records may be deleted during rewriting. FindClosestMatchingDominator should ignore these deleted instructions. Fixes PR24301. Reviewers: grosser Subscribers: grosser, llvm-commits Differential Revision: http://reviews.llvm.org/D13315 llvm-svn: 248983
15 lines
424 B
LLVM
15 lines
424 B
LLVM
; RUN: opt < %s -nary-reassociate -S | FileCheck %s
|
|
|
|
define i32 @foo(i32 %tmp4) {
|
|
; CHECK-LABEL: @foo(
|
|
entry:
|
|
%tmp5 = add i32 %tmp4, 8
|
|
%tmp13 = add i32 %tmp4, -128 ; deleted
|
|
%tmp14 = add i32 %tmp13, 8 ; => %tmp5 + -128
|
|
%tmp21 = add i32 119, %tmp4
|
|
; do not rewrite %tmp23 against %tmp13 because %tmp13 is already deleted
|
|
%tmp23 = add i32 %tmp21, -128
|
|
; CHECK: %tmp23 = add i32 %tmp21, -128
|
|
ret i32 %tmp23
|
|
}
|