brintos

brintos / llvm-project-archived public Read only

0
0
Text · 664 B · c85fcbf Raw
22 lines · plain
1; Check that the instcombine result is the same with/without debug info.2; This is a regression test for a function taken from malloc-free-delete.ll.3 4; RUN: opt < %s -passes=instcombine -S > %t.no_dbg.ll5; RUN: opt < %s -debugify-each -passes=instcombine -S > %t.ll6; RUN: diff %t.no_dbg.ll %t.ll7 8declare void @free(ptr)9 10define void @test12(ptr %foo) minsize {11entry:12  %tobool = icmp eq ptr %foo, null13  br i1 %tobool, label %if.end, label %if.then14 15if.then:                                          ; preds = %entry16  tail call void @free(ptr %foo)17  br label %if.end18 19if.end:                                           ; preds = %entry, %if.then20  ret void21}22