xref: /llvm-project/llvm/test/Transforms/LowerTypeTests/distinct-index-width-crash.ll (revision 916425b2d1644cad3dc96c52d27a78f523472bb7)
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2; RUN: opt -S -passes=lowertypetests < %s | FileCheck %s
3target datalayout = "e-p:64:64:64:32"
4
5@a = constant i32 1, !type !0
6@b = constant [2 x i32] [i32 2, i32 3], !type !1
7
8!0 = !{i32 0, !"typeid1"}
9!1 = !{i32 4, !"typeid1"}
10
11declare i1 @llvm.type.test(ptr %ptr, metadata %bitset) nounwind readnone
12
13define i1 @bar() {
14; CHECK-LABEL: @bar(
15; CHECK-NEXT:    ret i1 true
16;
17  %x = call i1 @llvm.type.test(ptr getelementptr ([2 x i32], ptr @b, i32 0, i32 1), metadata !"typeid1")
18  ret i1 %x
19}
20