1; RUN: llc -march=hexagon -mcpu=hexagonv5  -O3 < %s | FileCheck %s
2
3; Check that we combine TFRs and TFRIs into COMBINEs.
4
5@a = external global i16
6@b = external global i16
7@c = external global i16
8
9; Function Attrs: nounwind
10define i64 @test1() #0 {
11; CHECK: combine(#10, #0)
12entry:
13  store i16 0, i16* @a, align 2
14  store i16 10, i16* @b, align 2
15  ret i64 10
16}
17
18; Function Attrs: nounwind
19define i64 @test2() #0 {
20; CHECK: combine(#0, r{{[0-9]+}})
21entry:
22  store i16 0, i16* @a, align 2
23  %0 = load i16* @c, align 2
24  %conv2 = zext i16 %0 to i64
25  ret i64 %conv2
26}
27
28; Function Attrs: nounwind
29define i64 @test4() #0 {
30; CHECK: combine(#0, ##100)
31entry:
32  store i16 100, i16* @b, align 2
33  store i16 0, i16* @a, align 2
34  ret i64 0
35}
36