Lines Matching full:table
3 ; RUN: opt < %s -passes=rel-lookup-table-converter -relocation-model=pic -S | FileCheck %s
29 @switch.table.external_linkage = private unnamed_addr constant [3 x ptr] [ptr @a1, ptr @b1, ptr @c1…
31 @switch.table.internal_linkage = private unnamed_addr constant [3 x ptr] [ptr @a2, ptr @b2, ptr @c2…
33 @switch.table.string_table = private unnamed_addr constant [3 x ptr]
40 @switch.table.string_table_holes = private unnamed_addr constant [4 x ptr]
48 @switch.table.single_value = private unnamed_addr constant [3 x ptr]
55 @user_defined_lookup_table.table = internal unnamed_addr constant [3 x ptr]
62 @table = internal constant [2 x ptr] [
72 ; Lookup table check for integer pointers that have external linkage
73 ; CHECK: @switch.table.external_linkage = private unnamed_addr constant [3 x ptr] [ptr @a1, ptr @b1…
75 ; Lookup table check for integer pointers that have internal linkage
76 ; CHECK: @switch.table.internal_linkage.rel = private unnamed_addr constant [3 x i32]
78 ; CHECK-SAME: i32 trunc (i64 sub (i64 ptrtoint (ptr @a2 to i64), i64 ptrtoint (ptr @switch.table.in…
79 ; CHECK-SAME: i32 trunc (i64 sub (i64 ptrtoint (ptr @b2 to i64), i64 ptrtoint (ptr @switch.table.in…
80 ; CHECK-SAME: i32 trunc (i64 sub (i64 ptrtoint (ptr @c2 to i64), i64 ptrtoint (ptr @switch.table.in…
83 ; Relative switch lookup table for strings
84 ; CHECK: @switch.table.string_table.rel = private unnamed_addr constant [3 x i32]
86 ; CHECK-SAME: i32 trunc (i64 sub (i64 ptrtoint (ptr @.str to i64), i64 ptrtoint (ptr @switch.table.…
87 …nc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @switch.table.string_table.rel t…
88 …nc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @switch.table.string_table.rel t…
91 ; Relative switch lookup table for strings with holes, where holes are filled with relative offset …
92 ; CHECK: @switch.table.string_table_holes.rel = private unnamed_addr constant [4 x i32]
94 ; CHECK-SAME: i32 trunc (i64 sub (i64 ptrtoint (ptr @.str to i64), i64 ptrtoint (ptr @switch.table.…
95 …nc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @switch.table.string_table_holes…
96 …nc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @switch.table.string_table_holes…
97 …nc (i64 sub (i64 ptrtoint (ptr @.str.4 to i64), i64 ptrtoint (ptr @switch.table.string_table_holes…
101 ; CHECK: @switch.table.single_value.rel = private unnamed_addr constant [3 x i32]
103 ; CHECK-SAME: i32 trunc (i64 sub (i64 ptrtoint (ptr @.str to i64), i64 ptrtoint (ptr @switch.table.…
104 …nc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @switch.table.single_value.rel t…
105 …nc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @switch.table.single_value.rel t…
109 ; Relative lookup table for the loop hoist check test
110 ; CHECK: @table.rel = internal unnamed_addr constant [2 x i32]
112 ; CHECK-SAME: i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.8 to i64), i64 ptrtoint (ptr @table.rel t…
113 ; CHECK-SAME: i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.9 to i64), i64 ptrtoint (ptr @table.rel t…
116 ; Relative look up table for the test where gep is not immediately followed by a load check
123 ; Lookup table check for integer pointers that have external linkage
130 ; CHECK-NEXT: [[SWITCH_GEP:%.*]] = getelementptr inbounds [3 x ptr], ptr @switch.table.external_…
141 …%switch.gep = getelementptr inbounds [3 x ptr], ptr @switch.table.external_linkage, i32 0, i32 %co…
149 ; Relative switch lookup table for integer pointers that have internal linkage
157 ; CHECK-NEXT: [[RELTABLE_INTRINSIC:%.*]] = call ptr @llvm.load.relative.i32(ptr @switch.table.in…
167 …%switch.gep = getelementptr inbounds [3 x ptr], ptr @switch.table.internal_linkage, i32 0, i32 %co…
175 ; ; Relative switch lookup table for strings
183 …; CHECK-NEXT: [[RELTABLE_INTRINSIC:%.*]] = call ptr @llvm.load.relative.i32(ptr @switch.table.s…
193 %switch.gep = getelementptr inbounds [3 x ptr], ptr @switch.table.string_table, i32 0, i32 %cond
201 ; Relative switch lookup table for strings with holes, where holes are filled with relative offset …
209 ; CHECK-NEXT: [[RELTABLE_INTRINSIC:%.*]] = call ptr @llvm.load.relative.i32(ptr @switch.table.st…
219 …%switch.gep = getelementptr inbounds [4 x ptr], ptr @switch.table.string_table_holes, i32 0, i32 %…
229 ; If there is a lookup table, where each element contains the same value,
238 ; CHECK-NEXT: [[RELTABLE_INTRINSIC:%.*]] = call ptr @llvm.load.relative.i32(ptr @switch.table.si…
249 %switch.gep = getelementptr inbounds [3 x ptr], ptr @switch.table.single_value, i32 0, i32 %cond
259 ; Relative lookup table generated for a user-defined lookup table
268 …C:%.*]] = call ptr @llvm.load.relative.i64(ptr @user_defined_lookup_table.table.rel, i64 [[RELTABL…
280 …%arrayidx = getelementptr inbounds [3 x ptr], ptr @user_defined_lookup_table.table, i64 0, i64 %id…
290 ; When a lookup table is accessed inside a loop, and a gep is hosted outside the loop via licm,
299 ; CHECK-NEXT: [[RELTABLE_INTRINSIC:%.*]] = call ptr @llvm.load.relative.i32(ptr @table.rel, i32 …
307 %1 = getelementptr [2 x ptr], ptr @table, i32 0, i32 %x
320 ; When a lookup table is accessed, and gep is not immediately followed by a load (like if there is …