summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/BPF
diff options
context:
space:
mode:
authorAlexei Starovoitov <alexei.starovoitov@gmail.com>2015-09-17 22:18:08 +0000
committerAlexei Starovoitov <alexei.starovoitov@gmail.com>2015-09-17 22:18:08 +0000
commitbf19a11116c60d472bfc3062cbae9341a9debe37 (patch)
tree6b5a76c8937d4616073efe53889e770a41f95892 /llvm/lib/Target/BPF
parent8315b1c9959a41b598c0cfeba9dc549c8c75c131 (diff)
downloadbcm5719-llvm-bf19a11116c60d472bfc3062cbae9341a9debe37.tar.gz
bcm5719-llvm-bf19a11116c60d472bfc3062cbae9341a9debe37.zip
[bpf] expand indirect branches
BPF instruction set doesn't have indirect branches. Expand them. Reported by John Fastabend. llvm-svn: 247951
Diffstat (limited to 'llvm/lib/Target/BPF')
-rw-r--r--llvm/lib/Target/BPF/BPFISelLowering.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/BPF/BPFISelLowering.cpp b/llvm/lib/Target/BPF/BPFISelLowering.cpp
index 58498a1aec7..42e2b3f32c0 100644
--- a/llvm/lib/Target/BPF/BPFISelLowering.cpp
+++ b/llvm/lib/Target/BPF/BPFISelLowering.cpp
@@ -102,6 +102,7 @@ BPFTargetLowering::BPFTargetLowering(const TargetMachine &TM,
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);
OpenPOWER on IntegriCloud