[TTI] getTypeBasedIntrinsicInstrCost - add basic handling for strided load/store...
[llvm-project.git] / llvm / test / Transforms / JumpThreading / branch-debug-info.ll
blob8eead1324cb69133b2f6f6cc915c55815aa66d2b
1 ; RUN: opt -S -passes=debugify,jump-threading < %s | FileCheck %s
2 ; RUN: opt -S -passes=debugify,jump-threading < %s --try-experimental-debuginfo-iterators | FileCheck %s
3 ; Tests Bug 37966
5 define void @test0(i32 %i) {
6 ; CHECK-LABEL: @test0(
7 ; CHECK: left:
8 ; CHECK: br label %left, !dbg ![[DBG0:[0-9]+]]
9  entry:
10   %c0 = icmp ult i32 %i, 5
11   br i1 %c0, label %left, label %right
13  left:
14   br i1 %c0, label %left, label %right ; "line 3" to -debugify
16  right:
17   ret void
20 define void @test1(i32 %i, i32 %len) {
21 ; CHECK-LABEL: @test1(
22 ; CHECK: left:
23 ; CHECK: br label %right, !dbg ![[DBG1:[0-9]+]]
24  entry:
25   %i.inc = add nuw i32 %i, 1
26   %c0 = icmp ult i32 %i.inc, %len
27   br i1 %c0, label %left, label %right
29  left:
30   %c1 = icmp ult i32 %i, %len
31   br i1 %c1, label %right, label %left0 ; "line 9" to -debugify
33  left0:
34   ret void
36  right:
37   ret void
40 ; CHECK-DAG: ![[DBG0]] = !DILocation(line: 3,
41 ; CHECK-DAG: ![[DBG1]] = !DILocation(line: 9,