blob: 30bc5ed322560aaaf04107fc758e5b49d60945c6 [file] [log] [blame]
Krzysztof Parzyszek0bbad0f2016-08-10 18:05:47 +00001; RUN: llc -march=hexagon -hexagon-small-data-threshold=0 < %s | FileCheck %s
Jyotsna Verma5eb59802013-05-07 19:53:00 +00002
Krzysztof Parzyszek0bbad0f2016-08-10 18:05:47 +00003; Check that CONST32/CONST64 instructions are 'not' generated when the
4; small data threshold is set to 0.
Jyotsna Verma5eb59802013-05-07 19:53:00 +00005
Jyotsna Verma5eb59802013-05-07 19:53:00 +00006@a = external global i32
7@b = external global i32
8@la = external global i64
9@lb = external global i64
10
Krzysztof Parzyszek0bbad0f2016-08-10 18:05:47 +000011; CHECK-LABEL: test1:
Krzysztof Parzyszek6acecc92017-11-22 20:43:00 +000012; CHECK-NOT: CONST32
Krzysztof Parzyszek0bbad0f2016-08-10 18:05:47 +000013define void @test1() nounwind {
Jyotsna Verma5eb59802013-05-07 19:53:00 +000014entry:
Krzysztof Parzyszek0bbad0f2016-08-10 18:05:47 +000015 br label %block
16block:
Jyotsna Verma5eb59802013-05-07 19:53:00 +000017 store i32 12345670, i32* @a, align 4
Krzysztof Parzyszek0bbad0f2016-08-10 18:05:47 +000018 %q = ptrtoint i8* blockaddress (@test1, %block) to i32
19 store i32 %q, i32* @b, align 4
Jyotsna Verma5eb59802013-05-07 19:53:00 +000020 ret void
21}
22
Krzysztof Parzyszek0bbad0f2016-08-10 18:05:47 +000023; CHECK-LABEL: test2:
Jyotsna Verma5eb59802013-05-07 19:53:00 +000024; CHECK-NOT: CONST64
Krzysztof Parzyszek0bbad0f2016-08-10 18:05:47 +000025define void @test2() nounwind {
Jyotsna Verma5eb59802013-05-07 19:53:00 +000026entry:
27 store i64 1234567890123, i64* @la, align 8
28 store i64 1234567890123, i64* @lb, align 8
29 ret void
30}