repo.or.cz
/
llvm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add a missed SCEV fold that is required to continue analyzing the IR produced
[llvm.git]
/
test
/
Analysis
/
ScalarEvolution
/
fold.ll
blob
f46c691f46fd735dc1f285f867b4de7fd68219b9
1
; RUN: opt -analyze -scalar-evolution %s -S | FileCheck %s
2
3
define i16 @test1(i8 %x) {
4
%A = zext i8 %x to i12
5
%B = sext i12 %A to i16
6
; CHECK: zext i8 %x to i16
7
ret i16 %B
8
}
9
10
define i8 @test2(i8 %x) {
11
%A = zext i8 %x to i16
12
%B = add i16 %A, 1025
13
%C = trunc i16 %B to i8
14
; CHECK: (1 + %x)
15
ret i8 %C
16
}