Details
- Reviewers
dmgreen SjoerdMeijer samtebbs
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 258162 Build 402553: arc lint + arc unit
Event Timeline
Thanks for working on this, it looks good.
llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp | ||
---|---|---|
438 | Add 'try' to the start, like the other methods here? | |
4281 | These can be SDValue | |
4284 | It is clearer to use N0->getOpcode() != AArch64ISD::VSHL || | |
4287 | Check that N0.getOperand(0) == N1.getOperand(0), and that N0.getOperand(0).getOpcode() == ISD::XOR, to make sure they are the same XOR node. | |
4295 | There is a getConstantOperandVal, which is useful when we know the value is a constant and we want to get the value. | |
4302 | MVT::i64 should be VT I think, from N->getValueType(0) | |
llvm/test/CodeGen/AArch64/xar.ll | ||
11 | I believe the #54 should be part of the instruction |
I was just scrolling through GitHub issues and stumbled on this. Looks like a nice little addition, any plans on picking this up?
llvm/test/CodeGen/AArch64/xar.ll | ||
---|---|---|
11 | I don't think that 54 would be a part of the instruction, since the instruction itself (as defined in arm's reference) is XAR. I think the issue is with the naming here, I've renamed xar_54 to xar. |
Thanks for the update, this is looking OK to me. But I'm not 100% sure that we will receive notifications for phabricator any more as most work has moved to github pull requests.
llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp | ||
---|---|---|
4284 | This doesn't need quite as many brackets. | |
4287 | I think I would use if (N0->getOperand(0)->getOpcode() != N1->getOperand(0)->getOpcode() || N1->getOperand(0)->getOpcode() != ISD::XOR) But does something need to check that N0->getOperand(0) == N1->getOperand(0)? | |
4299 | This looks like it needs a clang-format for the patch. | |
4301 | if (ShAmt + HsAmt != 64) | |
4373–4375 | Maybe if (Subtarget->hasSHA3() && trySelectXAR(Node)) |
Thanks for the review @dmgreen
I ran clang-format on the patch and have resolved other comments.
As for notifications for this patch, I'll ping you on the github issue as well.
I'll submit github PRs for any new patches that I make from here on out.
llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp | ||
---|---|---|
4287 | I feel what you suggest should be enough, we would only check for the second condition (N1->getOperand(0)->getOpcode() != ISD::XOR) if the first one is false, |
Thanks. Can you create a github pr for this patch so I can use the submit button in the github UI?
llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp | ||
---|---|---|
4287 | I mean something like this: define <2 x i64> @xar(<2 x i64> %x, <2 x i64> %y, <2 x i64> %z) { %a1 = xor <2 x i64> %x, %y %a2 = xor <2 x i64> %x, %z %b = call <2 x i64> @llvm.fshl.v2i64(<2 x i64> %a1, <2 x i64> %a2, <2 x i64> <i64 10, i64 10>) ret <2 x i64> %b } I think it will mis-compile at the moment. |
llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp | ||
---|---|---|
4287 | Oh right got it, misread the previous comment. I’ll incorporate this change into the GitHub PR as well |
clang-format not found in user’s local PATH; not linting file.