[llvm] r247951 - [bpf] expand indirect branches

Alexei Starovoitov via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 15:18:08 PDT 2015


Author: ast
Date: Thu Sep 17 17:18:08 2015
New Revision: 247951

URL: http://llvm.org/viewvc/llvm-project?rev=247951&view=rev
Log:
[bpf] expand indirect branches

BPF instruction set doesn't have indirect branches. Expand them.

Reported by John Fastabend.

Modified:
    llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp

Modified: llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp?rev=247951&r1=247950&r2=247951&view=diff
==============================================================================
--- llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/BPF/BPFISelLowering.cpp Thu Sep 17 17:18:08 2015
@@ -102,6 +102,7 @@ BPFTargetLowering::BPFTargetLowering(con
 
   setOperationAction(ISD::BR_CC, MVT::i64, Custom);
   setOperationAction(ISD::BR_JT, MVT::Other, Expand);
+  setOperationAction(ISD::BRIND, MVT::Other, Expand);
   setOperationAction(ISD::BRCOND, MVT::Other, Expand);
   setOperationAction(ISD::SETCC, MVT::i64, Expand);
   setOperationAction(ISD::SELECT, MVT::i64, Expand);




More information about the llvm-commits mailing list