• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -sccp -S | grep {ret i101 12}
2
3@Y = constant [6 x i101] [ i101 12, i101 123456789000000, i101 -12,i101
4-123456789000000, i101 0,i101 9123456789000000]
5
6define i101 @array()
7{
8Head:
9   %A = getelementptr [6 x i101]* @Y, i32 0, i32 1
10
11   %B = load i101* %A
12   %C = icmp sge i101 %B, 1
13   br i1 %C, label %True, label %False
14True:
15   %D = and i101 %B, 1
16   %E = trunc i101 %D to i32
17   %F = getelementptr [6 x i101]* @Y, i32 0, i32 %E
18   %G = load i101* %F
19   br label %False
20False:
21   %H = phi i101 [%G, %True], [-1, %Head]
22   ret i101 %H
23}
24