[PATCH] D39688: [Nios2] final infrastructure addition to provide compilation of simple return from a function.
Andrei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 21 03:03:02 PST 2017
AndreiGrischenko 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";
}
----------------
AndreiGrischenko wrote:
> AndreiGrischenko wrote:
> > echristo wrote:
> > > craig.topper wrote:
> > > > That's a comparison not an assignment.
> > > Which also means an untested code path - relatedly, there are no tests here.
> > omg! Very stupid typo.
> Not exactly. This patch is aimed to start printing "ret" into assembly output, so I've added appropriate test case for that. Further I plan to add more test cases when adding exact things, not just infrastructure.
> However I will add one more test checking that Nios2 processors are accepted.
Current patch does not provide enough functionality to check that CPU=empty is incorrect.
https://reviews.llvm.org/D39688
More information about the llvm-commits
mailing list