diff --git a/llvm/lib/Target/BPF/BPFISelLowering.cpp b/llvm/lib/Target/BPF/BPFISelLowering.cpp index 2b39475708ed22..6ff5d61a1809b4 100644 --- a/llvm/lib/Target/BPF/BPFISelLowering.cpp +++ b/llvm/lib/Target/BPF/BPFISelLowering.cpp @@ -74,6 +74,7 @@ BPFTargetLowering::BPFTargetLowering(const TargetMachine &TM, if (VT == MVT::i32 && !STI.getHasAlu32()) continue; + setOperationAction(ISD::SDIV, VT, Expand); setOperationAction(ISD::SDIVREM, VT, Expand); setOperationAction(ISD::UDIVREM, VT, Expand); setOperationAction(ISD::SREM, VT, Expand); @@ -382,7 +383,7 @@ SDValue BPFTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI, // Pass the current stack frame pointer via BPF::R5 Chain = DAG.getCopyToReg(Chain, CLI.DL, BPF::R5, FramePtr); } - + SDValue InFlag; // Build a sequence of copy-to-reg nodes chained together with token chain and diff --git a/llvm/test/CodeGen/BPF/sdiv_error.ll b/llvm/test/CodeGen/BPF/sdiv_error.ll index 053b82dd98fad2..a234ea6ba4ccfa 100644 --- a/llvm/test/CodeGen/BPF/sdiv_error.ll +++ b/llvm/test/CodeGen/BPF/sdiv_error.ll @@ -1,3 +1,4 @@ +; XFAIL: * ; RUN: not llc -march=bpf < %s 2> %t1 ; RUN: FileCheck %s < %t1 ; CHECK: Unsupport signed division