• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -S -codegenprepare -disable-complex-addr-modes=false  %s | FileCheck %s --check-prefix=CHECK
2target datalayout =
3"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
4target triple = "x86_64-unknown-linux-gnu"
5
6define void @test() {
7entry:
8  %0 = getelementptr inbounds i64, i64 * null, i64 undef
9  br label %start
10
11start:
12  %val1 = phi i64 * [ %0, %entry ], [ %val4, %exit ]
13  %val2 = phi i64 * [ null, %entry ], [ %val5, %exit ]
14  br i1 false, label %slowpath, label %exit
15
16slowpath:
17  %elem1 = getelementptr inbounds i64, i64 * undef, i64 undef
18  br label %exit
19
20exit:
21; CHECK: sunkaddr
22  %val3 = phi i64 * [ undef, %slowpath ], [ %val2, %start ]
23  %val4 = phi i64 * [ %elem1, %slowpath ], [ %val1, %start ]
24  %val5 = phi i64 * [ undef, %slowpath ], [ %val2, %start ]
25  %loadx = load i64, i64 * %val4, align 8
26  br label %start
27}
28