brintos

brintos / llvm-project-archived public Read only

0
0
Text · 420 B · 9c96113 Raw
23 lines · plain
1; RUN: opt -passes="ipsccp<func-spec>" -force-specialization -S < %s2; Check that we don't crash when SwitchInst Constant is not ConstantInt.3 4@S = external constant [1 x i8]5 6define i1 @foo() {7entry:8  %tmp = call i32 @bar(ptr @S)9  ret i1 010}11 12define i32 @bar(ptr %arg) {13entry:14  %magicptr = ptrtoint ptr %arg to i6415  switch i64 %magicptr, label %bb2 [16    i64 0, label %bb117  ]18bb1:19  ret i32 020bb2:21  ret i32 122}23