summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/BPF/cc_args.ll
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2017-09-11 23:43:35 +0000
committerYonghong Song <yhs@fb.com>2017-09-11 23:43:35 +0000
commitbe9c00347fa7dcfb78f9f3a6c6c61a00a9071d31 (patch)
tree2803940d7947fbaa96faf1b40254362b90118cd1 /llvm/test/CodeGen/BPF/cc_args.ll
parent424aac368782c99537ab36cdf2f803d9ceebd8a5 (diff)
downloadbcm5719-llvm-be9c00347fa7dcfb78f9f3a6c6c61a00a9071d31.tar.gz
bcm5719-llvm-be9c00347fa7dcfb78f9f3a6c6c61a00a9071d31.zip
bpf: add " ll" in the LD_IMM64 asmstring
This partially revert previous fix in commit f5858045aa0b ("bpf: proper print imm64 expression in inst printer"). In that commit, the original suffix "ll" is removed from LD_IMM64 asmstring. In the customer print method, the "ll" suffix is printed if the rhs is an immediate. For example, "r2 = 5ll" => "r2 = 5ll", and "r3 = varll" => "r3 = var". This has an issue though for assembler. Since assembler relies on asmstring to do pattern matching, it will not be able to distiguish between "mov r2, 5" and "ld_imm64 r2, 5" since both asmstring is "r2 = 5". In such cases, the assembler uses 64bit load for all "r = <val>" asm insts. This patch adds back " ll" suffix for ld_imm64 with one additional space for "#reg = #global_var" case. Signed-off-by: Yonghong Song <yhs@fb.com> Acked-by: Alexei Starovoitov <ast@kernel.org> llvm-svn: 312978
Diffstat (limited to 'llvm/test/CodeGen/BPF/cc_args.ll')
-rw-r--r--llvm/test/CodeGen/BPF/cc_args.ll4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/BPF/cc_args.ll b/llvm/test/CodeGen/BPF/cc_args.ll
index a2ac03f0da1..6a0a07ae8e8 100644
--- a/llvm/test/CodeGen/BPF/cc_args.ll
+++ b/llvm/test/CodeGen/BPF/cc_args.ll
@@ -12,7 +12,7 @@ entry:
; CHECK: call f_i32
call void @f_i32(i32 12345678)
-; CHECK: r1 = 72623859790382856ll # encoding: [0x18,0x01,0x00,0x00,0x08,0x07,0x06,0x05,0x00,0x00,0x00,0x00,0x04,0x03,0x02,0x01]
+; CHECK: r1 = 72623859790382856 ll # encoding: [0x18,0x01,0x00,0x00,0x08,0x07,0x06,0x05,0x00,0x00,0x00,0x00,0x04,0x03,0x02,0x01]
; CHECK: call f_i64
call void @f_i64(i64 72623859790382856)
@@ -28,7 +28,7 @@ entry:
call void @f_i16_i32_i16(i16 2, i32 3, i16 4)
; CHECK: r1 = 5
-; CHECK: r2 = 7262385979038285ll
+; CHECK: r2 = 7262385979038285 ll
; CHECK: r3 = 6
; CHECK: call f_i16_i64_i16
call void @f_i16_i64_i16(i16 5, i64 7262385979038285, i16 6)
OpenPOWER on IntegriCloud