[PATCH] D27304: [PATCH] [Sema][X86] Don't allow floating-point return types when SSE is disabled

2016-12-05 Thread Michael Kuperstein via Phabricator via cfe-commits
mkuper added a comment. If there are real-life usecases, then GCC-compatible behavior is probably better than just rejecting it outright, so I'm retracting my comment from PR30426. (I would probably have liked x86_64 with -mno-sse2 and no -msoft-float to be an error, but I would also like a

[PATCH] D27304: [PATCH] [Sema][X86] Don't allow floating-point return types when SSE is disabled

2016-12-04 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Rejecting -mno-sse2 for x86_64 is even worse. Dynamic linkers e.g. in FreeBSD and NetBSD depend on that. They also don't contain floating point code, but that's a separate question. Similar constraints exist for the kernels. https://reviews.llvm.org/D27304

[PATCH] D27304: [PATCH] [Sema][X86] Don't allow floating-point return types when SSE is disabled

2016-12-04 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added reviewers: mkuper, dim, RKSimon. RKSimon added a comment. https://llvm.org/bugs/show_bug.cgi?id=30426#c3 On PR30426 the proposal was that we should just not accept x86_64 triples with no-sse/no-sse2 at the command line parsing level - we just have no way to guess what the coder

[PATCH] D27304: [PATCH] [Sema][X86] Don't allow floating-point return types when SSE is disabled

2016-12-01 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. The frontend is the wrong place as it doesn't even know if the register is ever going to be used. E.g. if it is a static function, all instances could be inlined away. https://reviews.llvm.org/D27304 ___ cfe-commits mailing

[PATCH] D27304: [PATCH] [Sema][X86] Don't allow floating-point return types when SSE is disabled

2016-12-01 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The logic to compute whether a calling convention uses SSE registers does exist in clang/lib/CodeGen/TargetInfo.cpp, so it might be possible to reuse that... but I'm not sure that's better than just detecting it in the backend. https://reviews.llvm.org/D27304

[PATCH] D27304: [PATCH] [Sema][X86] Don't allow floating-point return types when SSE is disabled

2016-12-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D27304#610944, @thegameg wrote: > In https://reviews.llvm.org/D27304#610697, @joerg wrote: > > > I think this is the absolutely wrong place to put such logic. It really can > > not be anywhere but the backend. > > > I am aware of this. But

[PATCH] D27304: [PATCH] [Sema][X86] Don't allow floating-point return types when SSE is disabled

2016-12-01 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D27304#610944, @thegameg wrote: > In https://reviews.llvm.org/D27304#610697, @joerg wrote: > > > I think this is the absolutely wrong place to put such logic. It really can > > not be anywhere but the backend. > > > I am aware of this. But

[PATCH] D27304: [PATCH] [Sema][X86] Don't allow floating-point return types when SSE is disabled

2016-12-01 Thread Visoiu Mistrih Francis via Phabricator via cfe-commits
thegameg added a comment. In https://reviews.llvm.org/D27304#610697, @joerg wrote: > I think this is the absolutely wrong place to put such logic. It really can > not be anywhere but the backend. I am aware of this. But the way the backend informs the Diagnostics looks like a crash, and asks

[PATCH] D27304: [PATCH] [Sema][X86] Don't allow floating-point return types when SSE is disabled

2016-12-01 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. I think this is the absolutely wrong place to put such logic. It really can not be anywhere but the backend. https://reviews.llvm.org/D27304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D27304: [PATCH] [Sema][X86] Don't allow floating-point return types when SSE is disabled

2016-12-01 Thread Visoiu Mistrih Francis via Phabricator via cfe-commits
thegameg created this revision. thegameg added reviewers: craig.topper, majnemer. thegameg added a subscriber: cfe-commits. The following program hits a fatal_error in the X86 backend, when the program is compiled with -mno-sse or -mno-sse2, which is understandable due to the calling convention: