[PATCH] D26855: New unsafe-fp-math implementation for X86 target

Gerolf Hoflehner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 22 16:07:36 PST 2016


Gerolf added a comment.

The "automatic" generation of pattern e.g. with TableGen is on my longer term wish list, not a requirement for this patch. Sorry if my wording was confusing. 
Do you have performance numbers?



================
Comment at: lib/Target/X86/X86InstrInfo.cpp:9430
+  // additional constant for reciprocal division but use the dividend instead.
+  // We're trying to find the devident definition and if it's a constant
+  // ExactlyOne value we'll use it
----------------
-> dividend


================
Comment at: lib/Target/X86/X86InstrInfo.cpp:9444
+            if (C->getType()->isVectorTy()) {
+              if (!(C = C->getSplatValue()))
+                return false;
----------------
Why this special case? just C = C->getSplatValue() would be easier to read.


================
Comment at: lib/Target/X86/X86InstrInfo.cpp:9536
+      0)            // undefined means it was not defined explicitly via option
+    Iterations = 1; //  or attribute that's wey we use the default value
+
----------------
wey -> why?


================
Comment at: lib/Target/X86/X86InstrInfo.cpp:9610
+    InsInstrs.push_back(MulMI); // C * X[i]
+
+    // 3: sub
----------------
Should there be a 2:?


https://reviews.llvm.org/D26855





More information about the llvm-commits mailing list