1; RUN: llc -march=hexagon  < %s | FileCheck %s
2
3; This test checks that S2_tstbit_i instruction is generated
4; and it does not assert.
5
6; CHECK: p{{[0-9]+}} = tstbit
7
8
9target triple = "hexagon-unknown-unknown-elf"
10
11%struct.hlist_node.45.966.3115.3729.4036.4650.4957.6492.6799.7413.7720.9562.10790.11097.11404.11711.14474.17192 = type { %struct.hlist_node.45.966.3115.3729.4036.4650.4957.6492.6799.7413.7720.9562.10790.11097.11404.11711.14474.17192*, %struct.hlist_node.45.966.3115.3729.4036.4650.4957.6492.6799.7413.7720.9562.10790.11097.11404.11711.14474.17192** }
12
13@.str.8 = external dso_local unnamed_addr constant [5 x i8], align 1
14
15declare dso_local void @panic(i8*, ...) local_unnamed_addr
16
17define dso_local fastcc void @elv_rqhash_find() unnamed_addr {
18entry:
19  %cmd_flags = getelementptr inbounds %struct.hlist_node.45.966.3115.3729.4036.4650.4957.6492.6799.7413.7720.9562.10790.11097.11404.11711.14474.17192, %struct.hlist_node.45.966.3115.3729.4036.4650.4957.6492.6799.7413.7720.9562.10790.11097.11404.11711.14474.17192* null, i32 -5
20  %0 = bitcast %struct.hlist_node.45.966.3115.3729.4036.4650.4957.6492.6799.7413.7720.9562.10790.11097.11404.11711.14474.17192* %cmd_flags to i64*
21  %1 = load i64, i64* %0, align 8
22  %2 = and i64 %1, 4294967296
23  %tobool10 = icmp eq i64 %2, 0
24  br i1 %tobool10, label %do.body11, label %do.end14
25
26do.body11:                                        ; preds = %entry
27  tail call void (i8*, ...) @panic(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i32 0, i32 0)) #1
28  unreachable
29
30do.end14:                                         ; preds = %entry
31  %and.i = and i64 %1, -4294967297
32  store i64 %and.i, i64* %0, align 8
33  ret void
34}
35