1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -march=hexagon -hexagon-instsimplify=0 < %s | FileCheck %s
4 ; Check that this compiles successfully.
6 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"
7 target triple = "hexagon"
9 define i32 @fred(ptr %a0) #0 {
11 ; CHECK: // %bb.0: // %b0
13 ; CHECK-NEXT: if (p0) jump:nt .LBB0_2
15 ; CHECK-NEXT: // %bb.1: // %b2
17 ; CHECK-NEXT: r3:2 = combine(#0,#0)
18 ; CHECK-NEXT: r1:0 = memd(r0+#0)
21 ; CHECK-NEXT: p0 = vcmph.eq(r1:0,r3:2)
24 ; CHECK-NEXT: r1:0 = mask(p0)
27 ; CHECK-NEXT: r0 = and(r0,#1)
30 ; CHECK-NEXT: p0 = cmp.eq(r0,#11)
34 ; CHECK-NEXT: if (p0) r0 = #0
35 ; CHECK-NEXT: jumpr r31
37 ; CHECK-NEXT: .LBB0_2: // %b14
40 ; CHECK-NEXT: jumpr r31
43 switch i32 undef, label %b14 [
52 %v2 = load <8 x i16>, ptr %a0, align 64
53 %v3 = icmp eq <8 x i16> %v2, zeroinitializer
54 %v4 = zext <8 x i1> %v3 to <8 x i16>
55 %v5 = add <8 x i16> zeroinitializer, %v4
56 %v6 = add <8 x i16> %v5, zeroinitializer
57 %v7 = add <8 x i16> %v6, zeroinitializer
58 %v8 = extractelement <8 x i16> %v7, i32 0
61 %v11 = add i16 %v10, 0
62 %v12 = icmp eq i16 %v11, 11
63 br i1 %v12, label %b14, label %b13
68 b14: ; preds = %b2, %b1, %b0
72 attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="+hvx-length64b,+hvxv60" }