• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=hexagon < %s | FileCheck %s
2
3; Check that the packetizer generates valid packets with constant
4; extended instructions.
5; CHECK: {
6; CHECK-NEXT: r{{[0-9]+}}{{ *}}={{ *}}add(r{{[0-9]+}}, ##{{[0-9]+}})
7; CHECK-NEXT: r{{[0-9]+}}{{ *}}={{ *}}add(r{{[0-9]+}}, ##{{[0-9]+}})
8; CHECK-NEXT: }
9
10define i32 @check-packet1(i32 %a, i32 %b, i32 %c) nounwind readnone {
11entry:
12  %add = add nsw i32 %a, 200000
13  %add1 = add nsw i32 %b, 200001
14  %add2 = add nsw i32 %c, 200002
15  %cmp = icmp sgt i32 %add, %add1
16  %b.addr.0 = select i1 %cmp, i32 %add1, i32 %add2
17  ret i32 %b.addr.0
18}
19