1 # RUN: llvm-mc -triple=hexagon -filetype=obj -o - %s | llvm-objdump -d - | FileCheck %s 2 # Hexagon Programmer's Reference Manual 11.10.7 XTYPE/PRED 3 4 # Bounds check 5 # CHECK: 83 f4 10 d2 6 p3 = boundscheck(r17:16, r21:20):raw:lo 7 # CHECK: a3 f4 10 d2 8 p3 = boundscheck(r17:16, r21:20):raw:hi 9 10 # Compare byte 11 # CHECK: 43 d5 d1 c7 12 p3 = cmpb.gt(r17, r21) 13 # CHECK: c3 d5 d1 c7 14 p3 = cmpb.eq(r17, r21) 15 # CHECK: e3 d5 d1 c7 16 p3 = cmpb.gtu(r17, r21) 17 # CHECK: a3 c2 11 dd 18 p3 = cmpb.eq(r17, #21) 19 # CHECK: a3 c2 31 dd 20 p3 = cmpb.gt(r17, #21) 21 # CHECK: a3 c2 51 dd 22 p3 = cmpb.gtu(r17, #21) 23 24 # Compare half 25 # CHECK: 63 d5 d1 c7 26 p3 = cmph.eq(r17, r21) 27 # CHECK: 83 d5 d1 c7 28 p3 = cmph.gt(r17, r21) 29 # CHECK: a3 d5 d1 c7 30 p3 = cmph.gtu(r17, r21) 31 # CHECK: ab c2 11 dd 32 p3 = cmph.eq(r17, #21) 33 # CHECK: ab c2 31 dd 34 p3 = cmph.gt(r17, #21) 35 # CHECK: ab c2 51 dd 36 p3 = cmph.gtu(r17, #21) 37 38 # Compare doublewords 39 # CHECK: 03 de 94 d2 40 p3 = cmp.eq(r21:20, r31:30) 41 # CHECK: 43 de 94 d2 42 p3 = cmp.gt(r21:20, r31:30) 43 # CHECK: 83 de 94 d2 44 p3 = cmp.gtu(r21:20, r31:30) 45 46 # Compare bitmask 47 # CHECK: 03 d5 91 85 48 p3 = bitsclr(r17, #21) 49 # CHECK: 03 d5 b1 85 50 p3 = !bitsclr(r17, #21) 51 # CHECK: 03 d5 51 c7 52 p3 = bitsset(r17, r21) 53 # CHECK: 03 d5 71 c7 54 p3 = !bitsset(r17, r21) 55 # CHECK: 03 d5 91 c7 56 p3 = bitsclr(r17, r21) 57 # CHECK: 03 d5 b1 c7 58 p3 = !bitsclr(r17, r21) 59 60 # mask generate from predicate 61 # CHECK: 10 c3 00 86 62 r17:16 = mask(p3) 63 64 # Check for TLB match 65 # CHECK: 63 f5 10 d2 66 p3 = tlbmatch(r17:16, r21) 67 68 # Predicate Transfer 69 # CHECK: 03 c0 45 85 70 p3 = r5 71 # CHECK: 05 c0 43 89 72 r5 = p3 73 74 # Test bit 75 # CHECK: 03 d5 11 85 76 p3 = tstbit(r17, #21) 77 # CHECK: 03 d5 31 85 78 p3 = !tstbit(r17, #21) 79 # CHECK: 03 d5 11 c7 80 p3 = tstbit(r17, r21) 81 # CHECK: 03 d5 31 c7 82 p3 = !tstbit(r17, r21) 83 84 # Vector compare halfwords 85 # CHECK: 63 de 14 d2 86 p3 = vcmph.eq(r21:20, r31:30) 87 # CHECK: 83 de 14 d2 88 p3 = vcmph.gt(r21:20, r31:30) 89 # CHECK: a3 de 14 d2 90 p3 = vcmph.gtu(r21:20, r31:30) 91 # CHECK: eb c3 14 dc 92 p3 = vcmph.eq(r21:20, #31) 93 # CHECK: eb c3 34 dc 94 p3 = vcmph.gt(r21:20, #31) 95 # CHECK: eb c3 54 dc 96 p3 = vcmph.gtu(r21:20, #31) 97 98 # Vector compare bytes for any match 99 # CHECK: 03 fe 14 d2 100 p3 = any8(vcmpb.eq(r21:20, r31:30)) 101 102 # Vector compare bytes 103 # CHECK: 63 de 14 d2 104 p3 = vcmph.eq(r21:20, r31:30) 105 # CHECK: 83 de 14 d2 106 p3 = vcmph.gt(r21:20, r31:30) 107 # CHECK: a3 de 14 d2 108 p3 = vcmph.gtu(r21:20, r31:30) 109 # CHECK: eb c3 14 dc 110 p3 = vcmph.eq(r21:20, #31) 111 # CHECK: eb c3 34 dc 112 p3 = vcmph.gt(r21:20, #31) 113 # CHECK: eb c3 54 dc 114 p3 = vcmph.gtu(r21:20, #31) 115 116 # Vector compare words 117 # CHECK: 03 de 14 d2 118 p3 = vcmpw.eq(r21:20, r31:30) 119 # CHECK: 23 de 14 d2 120 p3 = vcmpw.gt(r21:20, r31:30) 121 # CHECK: 43 de 14 d2 122 p3 = vcmpw.gtu(r21:20, r31:30) 123 # CHECK: f3 c3 14 dc 124 p3 = vcmpw.eq(r21:20, #31) 125 # CHECK: f3 c3 34 dc 126 p3 = vcmpw.gt(r21:20, #31) 127 # CHECK: f3 c3 54 dc 128 p3 = vcmpw.gtu(r21:20, #31) 129 130 # Viterbi pack even and odd predicate bits 131 # CHECK: 11 c2 03 89 132 r17 = vitpack(p3, p2) 133 134 # Vector mux 135 # CHECK: 70 de 14 d1 136 r17:16 = vmux(p3, r21:20, r31:30) 137