Christophe Duvernois
2012-Jun-04 11:28 UTC
[LLVMdev] Clang 3.1 __builtin_ia32_pcmpeqd128 doesn't work anymore
Thanks for the answer, So if i understand right, i can't directly compile the c code using clang. And i need to manually generate some llvm ir to replace the builtin function. Is that right? 2012/6/4 Duncan Sands <baldrick at free.fr>> Hi Christophe, > > > I recently migrate from llvm/clang 2.8 to 3.1. > > The builtin __builtin_ia32_pcmpeqd128 compile and works perfectly with > clang 2.8. > > But with clang 3.1, i get the compilation error : > > > > use of unknown builtin '__builtin_ia32_pcmpeqd128' > [-Wimplicit-function-declaration] > > __v4i comp = __builtin_ia32_pcmpeqd128(vectTag, vectTag2); > > > > (cf dummy.c -> clang -c dummy.c -o dummy.o) > > > > Is that normal? Is there an other way to do it? > > I think it was removed because you can get the same effect using generic > IR: > a "icmp eq" of the vectors, followed by a "sext" to the result type. > > Ciao, Duncan. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120604/0d36f140/attachment.html>
Duncan Sands
2012-Jun-04 11:29 UTC
[LLVMdev] Clang 3.1 __builtin_ia32_pcmpeqd128 doesn't work anymore
Hi Christophe,> So if i understand right, i can't directly compile the c code using clang. > And i need to manually generate some llvm ir to replace the builtin function. > > Is that right?I think so, though I don't know much about clang's support for such intrinsics, just what's in http://clang.llvm.org/compatibility.html#vector_builtins Ciao, Duncan.> > > 2012/6/4 Duncan Sands <baldrick at free.fr <mailto:baldrick at free.fr>> > > Hi Christophe, > > > I recently migrate from llvm/clang 2.8 to 3.1. > > The builtin __builtin_ia32_pcmpeqd128 compile and works perfectly with > clang 2.8. > > But with clang 3.1, i get the compilation error : > > > > use of unknown builtin '__builtin_ia32_pcmpeqd128' > [-Wimplicit-function-declaration] > > __v4i comp = __builtin_ia32_pcmpeqd128(vectTag, vectTag2); > > > > (cf dummy.c -> clang -c dummy.c -o dummy.o) > > > > Is that normal? Is there an other way to do it? > > I think it was removed because you can get the same effect using generic IR: > a "icmp eq" of the vectors, followed by a "sext" to the result type. > > Ciao, Duncan. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >
Hal Finkel
2012-Jun-04 12:26 UTC
[LLVMdev] Clang 3.1 __builtin_ia32_pcmpeqd128 doesn't work anymore
On Mon, 04 Jun 2012 13:29:56 +0200 Duncan Sands <baldrick at free.fr> wrote:> Hi Christophe, > > > So if i understand right, i can't directly compile the c code using > > clang. And i need to manually generate some llvm ir to replace the > > builtin function. > > > > Is that right? > > I think so, though I don't know much about clang's support for such > intrinsics, just what's in > http://clang.llvm.org/compatibility.html#vector_builtinsI think that you should write to the cfe-dev list about this. Just because the LLVM intrinsic was removed does not mean that the clang intrinsic cannot exist. clang should be able to generate the aforementioned generic IR. -Hal> > Ciao, Duncan. > > > > > > > 2012/6/4 Duncan Sands <baldrick at free.fr <mailto:baldrick at free.fr>> > > > > Hi Christophe, > > > > > I recently migrate from llvm/clang 2.8 to 3.1. > > > The builtin __builtin_ia32_pcmpeqd128 compile and works > > > perfectly with > > clang 2.8. > > > But with clang 3.1, i get the compilation error : > > > > > > use of unknown builtin '__builtin_ia32_pcmpeqd128' > > [-Wimplicit-function-declaration] > > > __v4i comp = __builtin_ia32_pcmpeqd128(vectTag, > > > vectTag2); > > > > > > (cf dummy.c -> clang -c dummy.c -o dummy.o) > > > > > > Is that normal? Is there an other way to do it? > > > > I think it was removed because you can get the same effect > > using generic IR: a "icmp eq" of the vectors, followed by a "sext" > > to the result type. > > > > Ciao, Duncan. > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu> > > http://llvm.cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-- Hal Finkel Postdoctoral Appointee Leadership Computing Facility Argonne National Laboratory
Anton Korobeynikov
2012-Jun-04 12:45 UTC
[LLVMdev] Clang 3.1 __builtin_ia32_pcmpeqd128 doesn't work anymore
Hello> So if i understand right, i can't directly compile the c code using clang. > And i need to manually generate some llvm ir to replace the builtin > function.This is gcc's internal builtin function which was removed from clang. One should either use *mmintrin.h files (as specified by http://clang.llvm.org/compatibility.html#vector_builtins) or do something similar to this (just wild guess): __v4i comp = (vectTag == vectTag2); -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Seemingly Similar Threads
- [LLVMdev] Clang 3.1 __builtin_ia32_pcmpeqd128 doesn't work anymore
- [LLVMdev] Clang 3.1 __builtin_ia32_pcmpeqd128 doesn't work anymore
- [LLVMdev] Clang 3.1 __builtin_ia32_pcmpeqd128 doesn't work anymore
- [LLVMdev] Clang 3.1 __builtin_ia32_pcmpeqd128 doesn't work anymore
- [LLVMdev] Clang 3.1 __builtin_ia32_pcmpeqd128 doesn't work anymore