summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/BPF/sdiv_error.ll
diff options
context:
space:
mode:
authorAlexei Starovoitov <alexei.starovoitov@gmail.com>2016-03-18 22:02:47 +0000
committerAlexei Starovoitov <alexei.starovoitov@gmail.com>2016-03-18 22:02:47 +0000
commit7e453bb8be17aa5f07f609091c288c3ae5f885dc (patch)
treef1716333c007e28d19ead36bdd4d4b59a708bb6d /llvm/test/CodeGen/BPF/sdiv_error.ll
parent4c0e45e8f672a84167af170901e6501c529ec648 (diff)
downloadbcm5719-llvm-7e453bb8be17aa5f07f609091c288c3ae5f885dc.tar.gz
bcm5719-llvm-7e453bb8be17aa5f07f609091c288c3ae5f885dc.zip
BPF: emit an error message for unsupported signed division operation
Signed-off-by: Yonghong Song <yhs@plumgrid.com> Signed-off-by: Alexei Starovoitov <ast@fb.com> llvm-svn: 263842
Diffstat (limited to 'llvm/test/CodeGen/BPF/sdiv_error.ll')
-rw-r--r--llvm/test/CodeGen/BPF/sdiv_error.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/BPF/sdiv_error.ll b/llvm/test/CodeGen/BPF/sdiv_error.ll
new file mode 100644
index 00000000000..053b82dd98f
--- /dev/null
+++ b/llvm/test/CodeGen/BPF/sdiv_error.ll
@@ -0,0 +1,9 @@
+; RUN: not llc -march=bpf < %s 2> %t1
+; RUN: FileCheck %s < %t1
+; CHECK: Unsupport signed division
+
+; Function Attrs: norecurse nounwind readnone
+define i32 @test(i32 %len) #0 {
+ %1 = srem i32 %len, 15
+ ret i32 %1
+}
OpenPOWER on IntegriCloud