[PATCH] D24221: AVX512F: FMA intrinsic + FNEG - sequence optimization
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 5 14:21:29 PDT 2016
spatel added inline comments.
================
Comment at: ../lib/Target/X86/X86ISelLowering.cpp:30307
@@ +30306,3 @@
+/// In this case we go though all bitcasts.
+bool isFNEG(SDNode *N, SDValue* Op0 = nullptr) {
+ if (N->getOpcode() == ISD::FNEG) {
----------------
This interface feels awkward. The normal pattern is:
static SDValue getFNeg(SDNode *N)
Ie, if there's no negated value, it will return the empty SDValue(), and the caller can use that as a bool value if it wants to.
================
Comment at: ../lib/Target/X86/X86ISelLowering.cpp:30359-30361
@@ +30358,5 @@
+ SDValue Arg;
+ bool IsFNEGNode = isFNEG(N, &Arg);
+ if (!IsFNEGNode)
+ llvm_unreachable("Expected FNEG node");
+
----------------
This question was missed?
Repository:
rL LLVM
https://reviews.llvm.org/D24221
More information about the llvm-commits
mailing list