1 ; This test shows a few canonicalizations made by deadargelim 2 ; RUN: opt < %s -deadargelim -S > %t 3 ; This test should remove {} and replace it with void 4 ; RUN: cat %t | grep {define internal void @test} 5 ; This test shouls replace the {i32} return value with just i32 6 ; RUN: cat %t | grep {define internal i32 @test2} 7 8 define internal {} @test() { 9 ret {} undef 10 } 11 12 define internal {i32} @test2() { 13 ret {i32} undef 14 } 15 16 define void @caller() { 17 call {} @test() 18 %X = call {i32} @test2() 19 %Y = extractvalue {i32} %X, 0 20 call void @user(i32 %Y, {i32} %X) 21 ret void 22 } 23 24 declare void @user(i32, {i32}) 25