brintos

brintos / llvm-project-archived public Read only

0
0
Text · 588 B · db7d26b Raw
21 lines · plain
1; RUN: llc -mtriple=aarch64 -mattr=+sve -stop-after=aarch64-promote-const < %s | FileCheck %s2 3; Test that the constant inside the `phi` is not promoted to a global4; CHECK-NOT: _PromotedConst5define void @f(i1 %c, ptr %p, ptr %q) {6entry:7  br i1 %c, label %if.then, label %if.else8 9if.then:10  %u = load [2 x <vscale x 4 x float> ], ptr %p11  br label %exit12 13if.else:14  br label %exit15 16exit:17  %v = phi [2 x <vscale x 4 x float> ]  [ %u, %if.then], [[<vscale x 4 x float> zeroinitializer, <vscale x 4 x float> poison], %if.else]18  store [2 x <vscale x 4 x float>] %v, ptr %q19  ret void20}21