[llvm] r327364 - bpf: Add more check directives in peephole testcase

Yonghong Song via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 12 23:46:59 PDT 2018


Author: yhs
Date: Mon Mar 12 23:46:59 2018
New Revision: 327364

URL: http://llvm.org/viewvc/llvm-project?rev=327364&view=rev
Log:
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 at netronome.com>
Signed-off-by: Yonghong Song <yhs at fb.com>

Modified:
    llvm/trunk/test/CodeGen/BPF/32-bit-subreg-peephole.ll

Modified: llvm/trunk/test/CodeGen/BPF/32-bit-subreg-peephole.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/BPF/32-bit-subreg-peephole.ll?rev=327364&r1=327363&r2=327364&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/BPF/32-bit-subreg-peephole.ll (original)
+++ llvm/trunk/test/CodeGen/BPF/32-bit-subreg-peephole.ll Mon Mar 12 23:46:59 2018
@@ -21,6 +21,8 @@ define dso_local i64 @select_u(i32 %a, i
 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, i
 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
 }




More information about the llvm-commits mailing list