1 ; RUN: llc -mtriple=hexagon < %s | FileCheck %s
3 ; Check that the vsplat instruction is generated
4 ; CHECK: r[[V:[0-9]+]] = ##1092616192
5 ; CHECK: vsplat(r[[V]])
7 target datalayout = "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048"
8 target triple = "hexagon"
9 ; Function Attrs: nofree norecurse nounwind writeonly
10 define dso_local i32 @foo(float* nocapture %0, i32 %1) local_unnamed_addr #0 {
11 %3 = icmp sgt i32 %1, 0
12 br i1 %3, label %4, label %22
15 %5 = icmp ult i32 %1, 64
16 br i1 %5, label %6, label %9
19 %7 = phi float* [ %0, %4 ], [ %11, %20 ]
20 %8 = phi i32 [ 0, %4 ], [ %10, %20 ]
25 %11 = getelementptr float, float* %0, i32 %10
29 %13 = phi i32 [ 0, %9 ], [ %18, %12 ]
30 %14 = getelementptr float, float* %0, i32 %13
31 %15 = bitcast float* %14 to <32 x float>*
32 store <32 x float> <float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01>, <32 x float>* %15, align 4
33 %16 = getelementptr float, float* %14, i32 32
34 %17 = bitcast float* %16 to <32 x float>*
35 store <32 x float> <float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01, float 1.000000e+01>, <32 x float>* %17, align 4
37 %19 = icmp eq i32 %18, %10
38 br i1 %19, label %20, label %12
41 %21 = icmp eq i32 %10, %1
42 br i1 %21, label %22, label %6
44 22: ; preds = %23, %20, %2
48 %24 = phi float* [ %28, %23 ], [ %7, %6 ]
49 %25 = phi i32 [ %26, %23 ], [ %8, %6 ]
50 store float 1.000000e+01, float* %24, align 4
51 %26 = add nuw nsw i32 %25, 1
52 %27 = icmp eq i32 %26, %1
53 %28 = getelementptr float, float* %24, i32 1
54 br i1 %27, label %22, label %23
57 attributes #0 = { nofree norecurse nounwind writeonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="hexagonv69" "target-features"="+hvx-length128b,+hvxv69,+v69,-long-calls" "unsafe-fp-math"="false" "use-soft-float"="false" }