brintos

brintos / llvm-project-archived public Read only

0
0
Text · 496 B · 1d8c50e Raw
24 lines · plain
1; RUN: opt < %s -passes=sccp -S | not grep %X2 3@G =  global [1000000 x i10000] zeroinitializer4 5define internal ptr @test(i10000 %Arg) {6	%X = getelementptr [1000000 x i10000], ptr @G, i32 0, i32 9997        store i10000 %Arg, ptr %X8	ret ptr %X9}10 11define i10000 @caller()12{13        %Y = call ptr @test(i10000 -1)14        %Z = load i10000, ptr %Y15        ret i10000 %Z 16}17 18define i10000 @caller2()19{20        %Y = call ptr @test(i10000 1)21        %Z = load i10000, ptr %Y22        ret i10000 %Z 23}24