getProcessTriple just determines operation system, and architecture. It doesn't deal with specific instruction set features. The CPU should be controlled by MCPU on the EngineBuilder i think. The CPU autodetection code lives in getHostCPUName in lib/Support/Host.cpp, but I don't think the JIT calls into. I think its expected the user would call it or pass a specific CPU string to the MCPU for the EngineBuilder. But getHostCPUName in LLVM 3.5 doesn't recognize Kabylake or Skylake. The Cannot select: means that an intrinsic was used but no pattern could be found in lib/Target/X86/X86GenDAGISel.inc that applies to the enabled feature set. We have separate patterns for that intrinsic for at least SSE4.1 and AVX1 in 3.5. So that implies that the EngineBuilder thinks your CPU doesn't support SSE4.1 or AVX1 either. But I'm not sure why you would be getting different behavior on Kabylake. Can you try setting EngineBuilder's MCPU to "core-avx2"? ~Craig On Mon, May 8, 2017 at 10:06 AM, Andy Schneider <andy at schnoberts.com> wrote:> Correction: getProcessTriple not getProcessTarget. > > On 8 May 2017, at 17:55, Andy Schneider via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > Thank you. I'm letting it auto detect by setting the target using > getProcessTarget. I disabled avx512 support by passing -avx512f (and the > other variants) to setMAttrs on EngineBuilder. I can see refs to avx512 in > X86.td. It's the exact same executable running on Kabylake. > > What does the Cannot select: specifically mean? Is there some table that > doesn't have a definition for a key in it that I would need to patch up? > > Am I answering your questions? > > > On 8 May 2017, at 17:32, Craig Topper <craig.topper at gmail.com> wrote: > > I can try to help. > > Are you passing a CPU string or are you letting it autodetect the CPU > using getHostCPUName? I don't see support detecting skylake or even avx-512 > support in the autodetection code that far back. Are you doing the same > thing for the i7 kabylake? How did you disable AVX-512 code gen? > > ~Craig > > On Mon, May 8, 2017 at 9:21 AM, Andy Schneider via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi, >> >> I have a JIT compiler using the legacy JIT on LLVM 3.5 that, when run on >> the Xeon v5 Skylakes produces "Cannot select: intrinsic % >> llvm.x86.sse41.round.sd". Note, this does not occur on i7 Kabylakes. To >> get this far I had to disable AVX512 code gen. >> >> Upgrading the system I am looking at from 3.5 to a later version is a big >> job that I'd prefer not to have on my critical path. >> >> Does anyone have any tips on where I would look to debug this sort of >> issue? I'm new to LLVM. >> >> Thanks >> >> Andy >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170508/f98ee4bc/attachment.html>
Thank you, will try that and dig into the code as well :)> On 8 May 2017, at 18:20, Craig Topper <craig.topper at gmail.com> wrote: > > getProcessTriple just determines operation system, and architecture. It doesn't deal with specific instruction set features. The CPU should be controlled by MCPU on the EngineBuilder i think. The CPU autodetection code lives in getHostCPUName in lib/Support/Host.cpp, but I don't think the JIT calls into. I think its expected the user would call it or pass a specific CPU string to the MCPU for the EngineBuilder. But getHostCPUName in LLVM 3.5 doesn't recognize Kabylake or Skylake. > > The Cannot select: means that an intrinsic was used but no pattern could be found in lib/Target/X86/X86GenDAGISel.inc that applies to the enabled feature set. We have separate patterns for that intrinsic for at least SSE4.1 and AVX1 in 3.5. So that implies that the EngineBuilder thinks your CPU doesn't support SSE4.1 or AVX1 either. But I'm not sure why you would be getting different behavior on Kabylake. > > Can you try setting EngineBuilder's MCPU to "core-avx2"? > > ~Craig > >> On Mon, May 8, 2017 at 10:06 AM, Andy Schneider <andy at schnoberts.com> wrote: >> Correction: getProcessTriple not getProcessTarget. >> >>> On 8 May 2017, at 17:55, Andy Schneider via llvm-dev <llvm-dev at lists.llvm.org> wrote: >>> >>> Thank you. I'm letting it auto detect by setting the target using getProcessTarget. I disabled avx512 support by passing -avx512f (and the other variants) to setMAttrs on EngineBuilder. I can see refs to avx512 in X86.td. It's the exact same executable running on Kabylake. >>> >>> What does the Cannot select: specifically mean? Is there some table that doesn't have a definition for a key in it that I would need to patch up? >>> >>> Am I answering your questions? >>> >>> >>> On 8 May 2017, at 17:32, Craig Topper <craig.topper at gmail.com> wrote: >>> >>>> I can try to help. >>>> >>>> Are you passing a CPU string or are you letting it autodetect the CPU using getHostCPUName? I don't see support detecting skylake or even avx-512 support in the autodetection code that far back. Are you doing the same thing for the i7 kabylake? How did you disable AVX-512 code gen? >>>> >>>> ~Craig >>>> >>>>> On Mon, May 8, 2017 at 9:21 AM, Andy Schneider via llvm-dev <llvm-dev at lists.llvm.org> wrote: >>>>> Hi, >>>>> >>>>> I have a JIT compiler using the legacy JIT on LLVM 3.5 that, when run on the Xeon v5 Skylakes produces "Cannot select: intrinsic %llvm.x86.sse41.round.sd". Note, this does not occur on i7 Kabylakes. To get this far I had to disable AVX512 code gen. >>>>> >>>>> Upgrading the system I am looking at from 3.5 to a later version is a big job that I'd prefer not to have on my critical path. >>>>> >>>>> Does anyone have any tips on where I would look to debug this sort of issue? I'm new to LLVM. >>>>> >>>>> Thanks >>>>> >>>>> Andy >>>>> _______________________________________________ >>>>> LLVM Developers mailing list >>>>> llvm-dev at lists.llvm.org >>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >>>> >>> _______________________________________________ >>> LLVM Developers mailing list >>> llvm-dev at lists.llvm.org >>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170508/b13a4670/attachment.html>
Hi, This was enough info for me to get the app I am looking after working. Thanks again. Andy> On 8 May 2017, at 18:25, Andy Schneider via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Thank you, will try that and dig into the code as well :) > >> On 8 May 2017, at 18:20, Craig Topper <craig.topper at gmail.com> wrote: >> >> getProcessTriple just determines operation system, and architecture. It doesn't deal with specific instruction set features. The CPU should be controlled by MCPU on the EngineBuilder i think. The CPU autodetection code lives in getHostCPUName in lib/Support/Host.cpp, but I don't think the JIT calls into. I think its expected the user would call it or pass a specific CPU string to the MCPU for the EngineBuilder. But getHostCPUName in LLVM 3.5 doesn't recognize Kabylake or Skylake. >> >> The Cannot select: means that an intrinsic was used but no pattern could be found in lib/Target/X86/X86GenDAGISel.inc that applies to the enabled feature set. We have separate patterns for that intrinsic for at least SSE4.1 and AVX1 in 3.5. So that implies that the EngineBuilder thinks your CPU doesn't support SSE4.1 or AVX1 either. But I'm not sure why you would be getting different behavior on Kabylake. >> >> Can you try setting EngineBuilder's MCPU to "core-avx2"? >> >> ~Craig >> >>> On Mon, May 8, 2017 at 10:06 AM, Andy Schneider <andy at schnoberts.com> wrote: >>> Correction: getProcessTriple not getProcessTarget. >>> >>>> On 8 May 2017, at 17:55, Andy Schneider via llvm-dev <llvm-dev at lists.llvm.org> wrote: >>>> >>>> Thank you. I'm letting it auto detect by setting the target using getProcessTarget. I disabled avx512 support by passing -avx512f (and the other variants) to setMAttrs on EngineBuilder. I can see refs to avx512 in X86.td. It's the exact same executable running on Kabylake. >>>> >>>> What does the Cannot select: specifically mean? Is there some table that doesn't have a definition for a key in it that I would need to patch up? >>>> >>>> Am I answering your questions? >>>> >>>> >>>> On 8 May 2017, at 17:32, Craig Topper <craig.topper at gmail.com> wrote: >>>> >>>>> I can try to help. >>>>> >>>>> Are you passing a CPU string or are you letting it autodetect the CPU using getHostCPUName? I don't see support detecting skylake or even avx-512 support in the autodetection code that far back. Are you doing the same thing for the i7 kabylake? How did you disable AVX-512 code gen? >>>>> >>>>> ~Craig >>>>> >>>>>> On Mon, May 8, 2017 at 9:21 AM, Andy Schneider via llvm-dev <llvm-dev at lists.llvm.org> wrote: >>>>>> Hi, >>>>>> >>>>>> I have a JIT compiler using the legacy JIT on LLVM 3.5 that, when run on the Xeon v5 Skylakes produces "Cannot select: intrinsic %llvm.x86.sse41.round.sd". Note, this does not occur on i7 Kabylakes. To get this far I had to disable AVX512 code gen. >>>>>> >>>>>> Upgrading the system I am looking at from 3.5 to a later version is a big job that I'd prefer not to have on my critical path. >>>>>> >>>>>> Does anyone have any tips on where I would look to debug this sort of issue? I'm new to LLVM. >>>>>> >>>>>> Thanks >>>>>> >>>>>> Andy >>>>>> _______________________________________________ >>>>>> LLVM Developers mailing list >>>>>> llvm-dev at lists.llvm.org >>>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >>>>> >>>> _______________________________________________ >>>> LLVM Developers mailing list >>>> llvm-dev at lists.llvm.org >>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170509/460bb58d/attachment-0001.html>