brintos

brintos / llvm-project-archived public Read only

0
0
Text · 647 B · 08990b2 Raw
26 lines · plain
1; This is a basic correctness check for constant propagation.  It tests the2; basic logic operations.3 4 5; RUN: opt < %s -passes=sccp -S | not grep and6; RUN: opt < %s -passes=sccp -S | not grep trunc7; RUN: opt < %s -passes=sccp -S | grep "ret i100 -1"8 9define i100 @test(i133 %A) {10        %B = and i133 0, %A11        %C = icmp sgt i133 %B, 012	br i1 %C, label %BB1, label %BB213BB1:14        %t3 = xor i133 %B, -115        %t4 = trunc i133 %t3 to i10016	br label %BB317BB2:18        %f1 = or i133 -1, %A19        %f2 = lshr i133 %f1, 3320        %f3 = trunc i133 %f2 to i10021	br label %BB322BB3:23	%Ret = phi i100 [%t4, %BB1], [%f3, %BB2]24	ret i100 %Ret25}26