brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1007 B · 5253792 Raw
27 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes='debugify,function(loop-mssa(licm))' -S | FileCheck %s3 4%Ty = type { i32, i32 }5@X2 = external global %Ty6 7; The GEP in dead1 is adding a zero offset, so the DIExpression can be kept as8; a "register location".9; The GEP in dead2 is adding a 4 bytes to the pointer, so the DIExpression is10; turned into an "implicit location" using DW_OP_stack_value.11define void @test11() {12; CHECK-LABEL: @test11(13; CHECK-NEXT:    br label [[LOOP:%.*]], !dbg [[DBG11:![0-9]+]]14; CHECK:       Loop:15; CHECK-NEXT:      #dbg_value(ptr @X2, [[META9:![0-9]+]], !DIExpression(DW_OP_plus_uconst, 4, DW_OP_stack_value), [[META12:![0-9]+]])16; CHECK-NEXT:    br i1 false, label [[LOOP]], label [[OUT:%.*]], !dbg [[DBG13:![0-9]+]]17; CHECK:       Out:18; CHECK-NEXT:    ret void, !dbg [[DBG14:![0-9]+]]19;20  br label %Loop21Loop:22  %dead2 = getelementptr %Ty, ptr @X2, i64 0, i32 123  br i1 false, label %Loop, label %Out24Out:25  ret void26}27