[PATCH] Lower FNEG ( FABS (x) ) -> FNABS (x) [X86 codegen] PR20578

Sanjay Patel spatel at rotateright.com
Fri Sep 26 16:23:19 PDT 2014


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:12344
@@ +12343,3 @@
+  if (IsFABS)
+    for (SDNode *User : Op->uses())
+      if (User->getOpcode() == ISD::FNEG)
----------------
delena wrote:
> I think this check is not necessary because the graph always comes from bottom.
Thanks for looking at this, Elena.

Without this check, all of the vector tests in the proposed test file fail because we process the FNEG first. I don't know why this is different between scalar and vector, but it is.

http://reviews.llvm.org/D5201






More information about the llvm-commits mailing list