[PATCH] D21960: [Sparc] Leon errata fixes passes.

Jacob Baungard Hansen via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 4 07:50:48 PDT 2016


jacob_hansen added a comment.

Can't seem to find tests for the following passes:

FlushCacheLineSWAP
IgnoreZeroFlag
FixCALL


================
Comment at: llvm/lib/Target/Sparc/LeonFeatures.td:18
@@ +17,3 @@
+// support to software floating point instructions
+def FeatureSoftFPU
+    : SubtargetFeature<
----------------
Is this feature definition needed/used anywhere? I think the previously defined sofware floating point definition in Sparc.td is enough. 

================
Comment at: llvm/lib/Target/Sparc/LeonFeatures.td:46
@@ +45,3 @@
+
+// requirement #LBR25
+def ReplaceSDIV
----------------
these requirement comments should probably be removed (here as well as in the descriptions).

================
Comment at: llvm/lib/Target/Sparc/LeonPasses.cpp:654
@@ +653,3 @@
+        unsigned NextOpcode = NMI.getOpcode();
+        // NMI.print(errs());
+        if (NextOpcode == SP::FADDD || NextOpcode == SP::FSUBD ||
----------------
Remove outcommented code.

================
Comment at: llvm/lib/Target/Sparc/LeonPasses.cpp:714
@@ +713,3 @@
+
+bool PreventRoundChange::runOnMachineFunction(MachineFunction &MF) {
+  Subtarget = &MF.getSubtarget<SparcSubtarget>();
----------------
would it make sense for the compiler to output a warning when this pass is successfully removing the call? The developer may want to know that the rounding mode change is not being executed correctly.

================
Comment at: llvm/test/CodeGen/SPARC/LeonPreventRoundChangeUT.ll:3
@@ +2,3 @@
+
+; CHECK: sdivcc %o0, %o1, %o0
+
----------------
is this check correct? Shouldn't it rather check that there is no call to fesetround ?


Repository:
  rL LLVM

http://reviews.llvm.org/D21960





More information about the llvm-commits mailing list