Re: [PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-11-05 Thread Eric Christopher via cfe-commits
On Mon, Nov 5, 2018 at 9:45 AM H.J Lu via Phabricator < revi...@reviews.llvm.org> wrote: > hjl.tools added a comment. > > In https://reviews.llvm.org/D53919#1287510, @echristo wrote: > > > In https://reviews.llvm.org/D53919#1282994, @hjl.tools wrote: > > > > > In

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-11-05 Thread H.J Lu via Phabricator via cfe-commits
hjl.tools added a comment. In https://reviews.llvm.org/D53919#1287510, @echristo wrote: > In https://reviews.llvm.org/D53919#1282994, @hjl.tools wrote: > > > In https://reviews.llvm.org/D53919#1282952, @efriedma wrote: > > > > > With both 3.3 and trunk (I don't have a 7.0 handy; I can build it

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-11-05 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. In https://reviews.llvm.org/D53919#1282994, @hjl.tools wrote: > In https://reviews.llvm.org/D53919#1282952, @efriedma wrote: > > > With both 3.3 and trunk (I don't have a 7.0 handy; I can build it if it > > would be helpful): > > > Please try clang 2.6 on both

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-10-31 Thread H.J Lu via Phabricator via cfe-commits
hjl.tools added a comment. In https://reviews.llvm.org/D53919#1282952, @efriedma wrote: > With both 3.3 and trunk (I don't have a 7.0 handy; I can build it if it would > be helpful): Please try clang 2.6 on both testcases. Repository: rC Clang https://reviews.llvm.org/D53919

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-10-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. With both 3.3 and trunk (I don't have a 7.0 handy; I can build it if it would be helpful): movaps .LCPI0_0(%rip), %xmm0 # xmm0 = [48,49,50,51] movaps .LCPI0_1(%rip), %xmm1 # xmm1 = [52,53,54,55] movaps .LCPI0_2(%rip), %xmm2 # xmm2 = [56,57,97,98]

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-10-31 Thread H.J Lu via Phabricator via cfe-commits
hjl.tools added a comment. In https://reviews.llvm.org/D53919#1282811, @efriedma wrote: > No, AVX512 wasn't even announced when clang 3.3 came out. Try this with clang 3.3 and clang 7.0. [hjl@gnu-cfl-1 tmp]$ cat z.c typedef int __attribute__((mode(SI))) si; typedef si

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-10-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. No, AVX512 wasn't even announced when clang 3.3 came out. Repository: rC Clang https://reviews.llvm.org/D53919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-10-31 Thread H.J Lu via Phabricator via cfe-commits
hjl.tools added a comment. In https://reviews.llvm.org/D53919#1282797, @efriedma wrote: > I just tried clang 3.3, and as far as I can tell it behaves the same way as > trunk. > > If the argument is that we should be compatible with gcc on Linux, that's > fine, but we should explicitly state

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-10-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I just tried clang 3.3, and as far as I can tell it behaves the same way as trunk. If the argument is that we should be compatible with gcc on Linux, that's fine, but we should explicitly state that in a comment. Repository: rC Clang

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-10-31 Thread H.J Lu via Phabricator via cfe-commits
hjl.tools added a comment. In https://reviews.llvm.org/D53919#1282748, @efriedma wrote: > The ABI document before AVX was introduced didn't say anything at all about > 256-bit vectors. So we're talking about compatibility with some other > compiler. Which compiler? X86-64 compilers created

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-10-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The ABI document before AVX was introduced didn't say anything at all about 256-bit vectors. So we're talking about compatibility with some other compiler. Which compiler? Repository: rC Clang https://reviews.llvm.org/D53919

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-10-31 Thread H.J Lu via Phabricator via cfe-commits
hjl.tools added a comment. In https://reviews.llvm.org/D53919#1282734, @efriedma wrote: > Whatever you call it, the question remains; what specification and/or > compiler are we trying to be compatible with? The ABI before AVX was introduced. Repository: rC Clang

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-10-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Whatever you call it, the question remains; what specification and/or compiler are we trying to be compatible with? Repository: rC Clang https://reviews.llvm.org/D53919 ___ cfe-commits mailing list

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-10-31 Thread H.J Lu via Phabricator via cfe-commits
hjl.tools added a comment. In https://reviews.llvm.org/D53919#1282692, @efriedma wrote: > As far as I know, according to the ABI docs, it's impossible to return a > 256-bit vector from a function if AVX is disabled. > > Given that we aren't rejecting the testcase, we're effectively implementing

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-10-31 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. As far as I know, according to the ABI docs, it's impossible to return a 256-bit vector from a function if AVX is disabled. Given that we aren't rejecting the testcase, we're effectively implementing a new "no-AVX" ABI variant. That variant is not defined anywhere,

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value on x86-64.

2018-10-31 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Retitling to just the x86-64 case. 32-bit mode has issues on arguments too I think and will need more work. The IsIllegalVectorType function is a member of the X86_64ABIInfo so we need to refactor or add a new one for 32-bit. Repository: rC Clang