projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbfbf21
)
bpf: Add more check directives in peephole testcase
author
Yonghong Song
<yhs@fb.com>
Tue, 13 Mar 2018 06:46:59 +0000
(06:46 +0000)
committer
Yonghong Song
<yhs@fb.com>
Tue, 13 Mar 2018 06:46:59 +0000
(06:46 +0000)
Improve the test accuracy by adding more check directives.
Shifts are expected to be eliminated for zero extension but not for signed
extension.
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Signed-off-by: Yonghong Song <yhs@fb.com>
llvm-svn: 327364
llvm/test/CodeGen/BPF/32-bit-subreg-peephole.ll
patch
|
blob
|
history
diff --git
a/llvm/test/CodeGen/BPF/32-bit-subreg-peephole.ll
b/llvm/test/CodeGen/BPF/32-bit-subreg-peephole.ll
index
8ec74ca
..
826ab2b
100644
(file)
--- a/
llvm/test/CodeGen/BPF/32-bit-subreg-peephole.ll
+++ b/
llvm/test/CodeGen/BPF/32-bit-subreg-peephole.ll
@@
-21,6
+21,8
@@
define dso_local i64 @select_u(i32 %a, i32 %b, i64 %c, i64 %d) local_unnamed_add
entry:
%cmp = icmp ugt i32 %a, %b
%c.d = select i1 %cmp, i64 %c, i64 %d
+; CHECK-NOT: r{{[0-9]+}} <<= 32
+; CHECK-NOT: r{{[0-9]+}} >>= 32
; CHECK: if r{{[0-9]+}} {{<|>}} r{{[0-9]+}} goto
ret i64 %c.d
}
@@
-31,6
+33,8
@@
define dso_local i64 @select_s(i32 %a, i32 %b, i64 %c, i64 %d) local_unnamed_add
entry:
%cmp = icmp sgt i32 %a, %b
%c.d = select i1 %cmp, i64 %c, i64 %d
+; CHECK: r{{[0-9]+}} <<= 32
+; CHECK-NEXT: r{{[0-9]+}} s>>= 32
; CHECK: if r{{[0-9]+}} s{{<|>}} r{{[0-9]+}} goto
ret i64 %c.d
}