repo.or.cz
/
llvm
/
stm8.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
This should always be signed chars, so use int8_t. This fixes a miscompile when
[llvm/stm8.git]
/
test
/
CodeGen
/
X86
/
zext-shl.ll
blob
928848e3f7a2fb17b53d4cbf141424cb93c7d3f8
1
; RUN: llc < %s -march=x86 | FileCheck %s
2
3
define i32 @t1(i8 zeroext %x) nounwind readnone ssp {
4
entry:
5
; CHECK: t1:
6
; CHECK: shll
7
; CHECK-NOT: movzwl
8
; CHECK: ret
9
%0 = zext i8 %x to i16
10
%1 = shl i16 %0, 5
11
%2 = zext i16 %1 to i32
12
ret i32 %2
13
}
14
15
define i32 @t2(i8 zeroext %x) nounwind readnone ssp {
16
entry:
17
; CHECK: t2:
18
; CHECK: shrl
19
; CHECK-NOT: movzwl
20
; CHECK: ret
21
%0 = zext i8 %x to i16
22
%1 = lshr i16 %0, 3
23
%2 = zext i16 %1 to i32
24
ret i32 %2
25
}