summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/BPF/BPFISelLowering.cpp6
-rw-r--r--llvm/test/CodeGen/BPF/32-bit-subreg-peephole.ll2
-rw-r--r--llvm/test/CodeGen/BPF/cmp.ll2
-rw-r--r--llvm/test/CodeGen/BPF/select_ri.ll2
4 files changed, 3 insertions, 9 deletions
diff --git a/llvm/lib/Target/BPF/BPFISelLowering.cpp b/llvm/lib/Target/BPF/BPFISelLowering.cpp
index e02cdf579d2..e81c2f5f832 100644
--- a/llvm/lib/Target/BPF/BPFISelLowering.cpp
+++ b/llvm/lib/Target/BPF/BPFISelLowering.cpp
@@ -502,13 +502,7 @@ SDValue BPFTargetLowering::LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const {
NegateCC(LHS, RHS, CC);
SDValue TargetCC = DAG.getConstant(CC, DL, LHS.getValueType());
-
SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Glue);
-
- // The constant is expected at RHS in Select_Ri pattern.
- if (isa<ConstantSDNode>(LHS.getNode()))
- std::swap(LHS, RHS);
-
SDValue Ops[] = {LHS, RHS, TargetCC, TrueV, FalseV};
return DAG.getNode(BPFISD::SELECT_CC, DL, VTs, Ops);
diff --git a/llvm/test/CodeGen/BPF/32-bit-subreg-peephole.ll b/llvm/test/CodeGen/BPF/32-bit-subreg-peephole.ll
index ed5268458f8..cf68ec56ca3 100644
--- a/llvm/test/CodeGen/BPF/32-bit-subreg-peephole.ll
+++ b/llvm/test/CodeGen/BPF/32-bit-subreg-peephole.ll
@@ -1,4 +1,4 @@
-; RUN: llc -O2 -march=bpfel -mattr=+alu32 < %s | FileCheck %s
+; RUN: llc -O2 -march=bpfel -mcpu=v2 -mattr=+alu32 < %s | FileCheck %s
;
; long long select_u(unsigned a, unsigned b, long long c, long long d)
; {
diff --git a/llvm/test/CodeGen/BPF/cmp.ll b/llvm/test/CodeGen/BPF/cmp.ll
index d86f1903ffe..44f00ff02c4 100644
--- a/llvm/test/CodeGen/BPF/cmp.ll
+++ b/llvm/test/CodeGen/BPF/cmp.ll
@@ -97,7 +97,7 @@ define zeroext i8 @minu(i8 zeroext %a, i8 zeroext %b) #0 {
%a.b = select i1 %1, i8 %a, i8 %b
ret i8 %a.b
; CHECK-LABEL:minu:
-; CHECK: if r{{[0-9]+}} {{<|>}} 100
+; CHECK: if r{{[0-9]+}} {{<|>}} r{{[0-9]+}}
}
; Function Attrs: nounwind readnone uwtable
diff --git a/llvm/test/CodeGen/BPF/select_ri.ll b/llvm/test/CodeGen/BPF/select_ri.ll
index dbd21113d7f..61e852d74b0 100644
--- a/llvm/test/CodeGen/BPF/select_ri.ll
+++ b/llvm/test/CodeGen/BPF/select_ri.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=bpf -verify-machineinstrs | FileCheck %s
+; RUN: llc < %s -march=bpf -mcpu=v2 -verify-machineinstrs | FileCheck %s
;
; Source file:
; int b, c;
OpenPOWER on IntegriCloud