diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2020-01-17 20:45:01 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2020-01-17 20:45:01 +0000 |
| commit | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (patch) | |
| tree | 4adf86a776049cbf7f69a1929c4babcbbef925eb /llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp | |
| parent | 7cc9cf2bf09f069cb2dd947ead05d0b54301fb71 (diff) | |
Notes
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp')
| -rw-r--r-- | llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp b/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp index 751034c2d41a..3927a977e6fc 100644 --- a/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp +++ b/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp @@ -347,9 +347,12 @@ public: bool runOnMachineFunction(MachineFunction &MF) override { const Function &F = MF.getFunction(); - if (F.getFnAttribute("mnop-mcount").getValueAsString() == "true" && - F.getFnAttribute("fentry-call").getValueAsString() != "true") - report_fatal_error("mnop-mcount only supported with fentry-call"); + if (F.getFnAttribute("fentry-call").getValueAsString() != "true") { + if (F.hasFnAttribute("mnop-mcount")) + report_fatal_error("mnop-mcount only supported with fentry-call"); + if (F.hasFnAttribute("mrecord-mcount")) + report_fatal_error("mrecord-mcount only supported with fentry-call"); + } Subtarget = &MF.getSubtarget<SystemZSubtarget>(); return SelectionDAGISel::runOnMachineFunction(MF); @@ -1494,8 +1497,9 @@ void SystemZDAGToDAGISel::Select(SDNode *Node) { if (ChildOpcode == ISD::AND || ChildOpcode == ISD::OR || ChildOpcode == ISD::XOR) break; - // Check whether this expression matches OR-with-complement. - if (Opcode == ISD::OR && ChildOpcode == ISD::XOR) { + // Check whether this expression matches OR-with-complement + // (or matches an alternate pattern for NXOR). + if (ChildOpcode == ISD::XOR) { auto Op0 = Node->getOperand(0); if (auto *Op0Op1 = dyn_cast<ConstantSDNode>(Op0->getOperand(1))) if (Op0Op1->getZExtValue() == (uint64_t)-1) |
