[PATCH] D39688: [Nios2] final infrastructure addition to provide compilation of simple return from a function.

Eric Christopher via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 10:07:51 PST 2017


echristo added inline comments.


================
Comment at: lib/Target/Nios2/MCTargetDesc/Nios2MCTargetDesc.cpp:49
   if (CPU.empty() || CPU == "generic") {
-    if (TT.getArch() == Triple::nios2) {
-      if (CPU.empty() || CPU == "nios2r2") {
-        ArchFS = "+nios2r2";
-      } else {
-        if (CPU == "nios2r1") {
-          ArchFS = "+nios2r1";
-        }
-      }
-    }
+    CPU == "nios2r1";
   }
----------------
craig.topper wrote:
> That's a comparison not an assignment.
Which also means an untested code path - relatedly, there are no tests here.


https://reviews.llvm.org/D39688





More information about the llvm-commits mailing list