llvm-project/llvm/test/Transforms/Reassociate/infloop-deadphi.ll

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
710 B
LLVM
Raw Normal View History

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -reassociate %s -S | FileCheck %s
target triple = "x86_64-unknown-linux-gnu"
define void @f() {
; CHECK-LABEL: @f(
; CHECK-NEXT: entry:
; CHECK-NEXT: br label [[DONE:%.*]]
; CHECK: dead:
; CHECK-NEXT: [[XOR0:%.*]] = xor i16 [[XOR1:%.*]], undef
; CHECK-NEXT: [[XOR1]] = xor i16 [[XOR0]], undef
; CHECK-NEXT: br i1 undef, label [[DEAD:%.*]], label [[DONE]]
; CHECK: done:
; CHECK-NEXT: ret void
;
entry:
br label %done
dead:
%xor0 = xor i16 %xor1, undef
%xor1 = xor i16 %xor0, undef
br i1 undef, label %dead, label %done
done:
%e = phi i16 [ %xor1, %dead ], [ 0, %entry ]
ret void
}