summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-08-20 23:33:31 +0000
committerMatthias Braun <matze@braunis.de>2015-08-20 23:33:31 +0000
commit266204b7dc4ee64dfa8493cdf76902f424933fe8 (patch)
tree5b230d63a4d0b36bb59d8b4dd58227a3328974cb /llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
parent549718563d09e1893139af80bb85f7fb18a294b9 (diff)
downloadbcm5719-llvm-266204b7dc4ee64dfa8493cdf76902f424933fe8.tar.gz
bcm5719-llvm-266204b7dc4ee64dfa8493cdf76902f424933fe8.zip
AArch64: Do not create CCMP on multiple users.
Create CMP;CCMP sequences from and/or trees does not gain us anything if the and/or tree is materialized to a GP register anyway. While most of the code already checked for hasOneUse() there was one important case missing. llvm-svn: 245640
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64ISelLowering.cpp')
-rw-r--r--llvm/lib/Target/AArch64/AArch64ISelLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 206088dd5e8..3d1235bac0a 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -1349,7 +1349,7 @@ static SDValue emitConjunctionDisjunctionTree(SelectionDAG &DAG, SDValue Val,
unsigned NZCV = AArch64CC::getNZCVToSatisfyCondCode(InvOutCC);
return emitConditionalComparison(LHS, RHS, CC, CCOp, ConditionOp, NZCV, DL,
DAG);
- } else if (Opcode != ISD::AND && Opcode != ISD::OR)
+ } else if ((Opcode != ISD::AND && Opcode != ISD::OR) || !Val->hasOneUse())
return SDValue();
assert((Opcode == ISD::OR || !PushNegate)
OpenPOWER on IntegriCloud