diff options
author | Alexei Starovoitov <alexei.starovoitov@gmail.com> | 2016-11-18 02:32:35 +0000 |
---|---|---|
committer | Alexei Starovoitov <alexei.starovoitov@gmail.com> | 2016-11-18 02:32:35 +0000 |
commit | 8f9f8210c1f4846e70642595aab81e527dc5336c (patch) | |
tree | 2ead9a7b483faa203c4bbcd7ffced8616ff496c8 /llvm/test/CodeGen/BPF/loops.ll | |
parent | faad4c30fa4ebf2d766944b558a38f15695ebe1b (diff) | |
download | bcm5719-llvm-8f9f8210c1f4846e70642595aab81e527dc5336c.tar.gz bcm5719-llvm-8f9f8210c1f4846e70642595aab81e527dc5336c.zip |
convert bpf assembler to look like kernel verifier output
since bpf instruction set was introduced people learned to
read and understand kernel verifier output whereas llvm asm
output stayed obscure and unknown. Convert llvm to emit
assembler text similar to kernel to avoid this discrepancy
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
llvm-svn: 287300
Diffstat (limited to 'llvm/test/CodeGen/BPF/loops.ll')
-rw-r--r-- | llvm/test/CodeGen/BPF/loops.ll | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/test/CodeGen/BPF/loops.ll b/llvm/test/CodeGen/BPF/loops.ll index 00be54b3bac..39278fe595c 100644 --- a/llvm/test/CodeGen/BPF/loops.ll +++ b/llvm/test/CodeGen/BPF/loops.ll @@ -10,7 +10,7 @@ for.body: ; preds = %for.body, %entry %sum.09 = phi i16 [ 0, %entry ], [ %add, %for.body ] ; <i16> [#uses=1] %arrayidx = getelementptr i16, i16* %a, i16 %i.010 ; <i16*> [#uses=1] ; CHECK-LABEL: add: -; CHECK: add r{{[0-9]+}}, r{{[0-9]+}} +; CHECK: r{{[0-9]+}} += r{{[0-9]+}} %tmp4 = load i16, i16* %arrayidx ; <i16> [#uses=1] %add = add i16 %tmp4, %sum.09 ; <i16> [#uses=2] %inc = add i16 %i.010, 1 ; <i16> [#uses=2] @@ -32,7 +32,7 @@ for.body: ; preds = %for.body, %entry %sum.09 = phi i16 [ 0, %entry ], [ %add, %for.body ] ; <i16> [#uses=1] %arrayidx = getelementptr i16, i16* %a, i16 %i.010 ; <i16*> [#uses=1] ; CHECK-LABEL: sub: -; CHECK: sub r{{[0-9]+}}, r{{[0-9]+}} +; CHECK: r{{[0-9]+}} -= r{{[0-9]+}} %tmp4 = load i16, i16* %arrayidx ; <i16> [#uses=1] %add = sub i16 %tmp4, %sum.09 ; <i16> [#uses=2] %inc = add i16 %i.010, 1 ; <i16> [#uses=2] @@ -54,7 +54,7 @@ for.body: ; preds = %for.body, %entry %sum.09 = phi i16 [ 0, %entry ], [ %add, %for.body ] ; <i16> [#uses=1] %arrayidx = getelementptr i16, i16* %a, i16 %i.010 ; <i16*> [#uses=1] ; CHECK-LABEL: or: -; CHECK: or r{{[0-9]+}}, r{{[0-9]+}} +; CHECK: r{{[0-9]+}} |= r{{[0-9]+}} %tmp4 = load i16, i16* %arrayidx ; <i16> [#uses=1] %add = or i16 %tmp4, %sum.09 ; <i16> [#uses=2] %inc = add i16 %i.010, 1 ; <i16> [#uses=2] @@ -76,7 +76,7 @@ for.body: ; preds = %for.body, %entry %sum.09 = phi i16 [ 0, %entry ], [ %add, %for.body ] ; <i16> [#uses=1] %arrayidx = getelementptr i16, i16* %a, i16 %i.010 ; <i16*> [#uses=1] ; CHECK-LABEL: xor: -; CHECK: xor r{{[0-9]+}}, r{{[0-9]+}} +; CHECK: r{{[0-9]+}} ^= r{{[0-9]+}} %tmp4 = load i16, i16* %arrayidx ; <i16> [#uses=1] %add = xor i16 %tmp4, %sum.09 ; <i16> [#uses=2] %inc = add i16 %i.010, 1 ; <i16> [#uses=2] @@ -98,7 +98,7 @@ for.body: ; preds = %for.body, %entry %sum.09 = phi i16 [ 0, %entry ], [ %add, %for.body ] ; <i16> [#uses=1] %arrayidx = getelementptr i16, i16* %a, i16 %i.010 ; <i16*> [#uses=1] ; CHECK-LABEL: and: -; CHECK: and r{{[0-9]+}}, r{{[0-9]+}} +; CHECK: r{{[0-9]+}} &= r{{[0-9]+}} %tmp4 = load i16, i16* %arrayidx ; <i16> [#uses=1] %add = and i16 %tmp4, %sum.09 ; <i16> [#uses=2] %inc = add i16 %i.010, 1 ; <i16> [#uses=2] |