summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2018-03-13 06:46:59 +0000
committerYonghong Song <yhs@fb.com>2018-03-13 06:46:59 +0000
commitfddb9f4e2887a28ac0205adb7bb6934f7396c1e9 (patch)
tree62e67a00534d805245c2ca9467b2fd43a7c0361f /llvm
parentbbfbf21ddc01467853db1198b7ec43bb3e6b3f0c (diff)
downloadbcm5719-llvm-fddb9f4e2887a28ac0205adb7bb6934f7396c1e9.tar.gz
bcm5719-llvm-fddb9f4e2887a28ac0205adb7bb6934f7396c1e9.zip
bpf: Add more check directives in peephole testcase
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
Diffstat (limited to 'llvm')
-rw-r--r--llvm/test/CodeGen/BPF/32-bit-subreg-peephole.ll4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/BPF/32-bit-subreg-peephole.ll b/llvm/test/CodeGen/BPF/32-bit-subreg-peephole.ll
index 8ec74ca3bf2..826ab2b8362 100644
--- 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
}
OpenPOWER on IntegriCloud