mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-04 03:17:51 +00:00
7a1e93493d
Summary: ValueTracking used to overwrite the analysis results computed from assumes and dominating conditions. This patch fixes this issue. Test Plan: test/Analysis/ValueTracking/assume.ll Reviewers: hfinkel, majnemer Reviewed By: majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10283 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239718 91177308-0d34-0410-b5e6-96231b3b80d8
19 lines
380 B
LLVM
19 lines
380 B
LLVM
; RUN: opt < %s -instcombine -value-tracking-dom-conditions -S | FileCheck %s
|
|
|
|
define i32 @dom_cond(i32 %a, i32 %b) {
|
|
; CHECK-LABEL: @dom_cond(
|
|
entry:
|
|
%v = add i32 %a, %b
|
|
%cond = icmp ule i32 %v, 7
|
|
br i1 %cond, label %then, label %exit
|
|
|
|
then:
|
|
%v2 = add i32 %v, 8
|
|
; CHECK: or i32 %v, 8
|
|
br label %exit
|
|
|
|
exit:
|
|
%v3 = phi i32 [ %v, %entry ], [ %v2, %then ]
|
|
ret i32 %v3
|
|
}
|