• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; REQUIRES: asserts
2
3; RUN: opt -newgvn -S %s | FileCheck %s
4
5; XFAIL: *
6
7; TODO: Current NewGVN crashes on the function below. See PR37121.
8
9define hidden void @foo() {
10top:
11  %.promoted = load i8, i8* undef, align 8
12  br label %if
13
14;; This is really a multi-valued phi, because the phi is defined by an expression of the phi.
15;; This means that we can't propagate the value over the backedge, because we'll just cycle
16;; through every value.
17
18if:                                               ; preds = %if, %top
19  %0 = phi i8 [ %1, %if ], [ %.promoted, %top ]
20  %1 = xor i8 %0, undef
21  br i1 false, label %L50, label %if
22
23L50:                                              ; preds = %if
24  %.lcssa = phi i8 [ %1, %if ]
25  store i8 %.lcssa, i8* undef, align 8
26  ret void
27}
28