brintos

brintos / llvm-project-archived public Read only

0
0
Text · 653 B · 278f9b3 Raw
24 lines · plain
1; RUN: opt < %s -passes='deadargelim,function(dce)' -S > %t2; RUN: cat %t | grep 1233 4; This test tries to catch wrongful removal of return values for a specific case5; that was breaking llvm-gcc builds.6 7; This function has a live return value, it is used by @alive.8define internal i32 @test5() {9  ret i32 123 10}11 12; This function doesn't use the return value @test5 and tries to lure DAE into13; marking @test5's return value dead because only this call is unused.14define i32 @dead() {15  %DEAD = call i32 @test5()16  ret i32 017}18 19; This function ensures the retval of @test5 is live.20define i32 @alive() {21  %LIVE = call i32 @test5()22  ret i32 %LIVE23}24