aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/BPF/sdiv_error.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/BPF/sdiv_error.ll')
-rw-r--r--test/CodeGen/BPF/sdiv_error.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/BPF/sdiv_error.ll b/test/CodeGen/BPF/sdiv_error.ll
new file mode 100644
index 000000000000..053b82dd98fa
--- /dev/null
+++ b/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
+}