diff options
author | Alexei Starovoitov <alexei.starovoitov@gmail.com> | 2016-03-18 22:02:47 +0000 |
---|---|---|
committer | Alexei Starovoitov <alexei.starovoitov@gmail.com> | 2016-03-18 22:02:47 +0000 |
commit | 7e453bb8be17aa5f07f609091c288c3ae5f885dc (patch) | |
tree | f1716333c007e28d19ead36bdd4d4b59a708bb6d /llvm/lib/Target | |
parent | 4c0e45e8f672a84167af170901e6501c529ec648 (diff) | |
download | bcm5719-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/lib/Target')
-rw-r--r-- | llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp b/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp index 9d5f1d406d0..05348ae5db0 100644 --- a/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp +++ b/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp @@ -130,6 +130,18 @@ SDNode *BPFDAGToDAGISel::Select(SDNode *Node) { // tablegen selection should be handled here. switch (Opcode) { default: break; + case ISD::SDIV: { + DebugLoc Empty; + const DebugLoc &DL = Node->getDebugLoc(); + if (DL != Empty) + errs() << "Error at line " << DL.getLine() << ": "; + else + errs() << "Error: "; + errs() << "Unsupport signed division for DAG: "; + Node->dump(CurDAG); + errs() << "Please convert to unsigned div/mod.\n"; + break; + } case ISD::INTRINSIC_W_CHAIN: { unsigned IntNo = cast<ConstantSDNode>(Node->getOperand(1))->getZExtValue(); switch (IntNo) { |