Does anyone know some simple c/c++ code or .ll code which will cause this ctlz pattern to be emitted? Tia. Reed
Are you looking for something other than calling __builtin_clz from c++ or calling @llvm.ctlz.* instrinsic from IR? I don't think we have anything that will auto converting a loop to ctlz or anything like that. We only seem to have a detection for popcount loops. On Thu, Aug 15, 2013 at 9:01 PM, reed kotler <rkotler at mips.com> wrote:> Does anyone know some simple c/c++ code or .ll code which will cause this > ctlz pattern to be emitted? > > Tia. > > Reed > > > ______________________________**_________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev> >-- ~Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130815/1d72b17d/attachment.html>
On 08/15/2013 09:13 PM, Craig Topper wrote:> Are you looking for something other than calling __builtin_clz from > c++ or calling @llvm.ctlz.* instrinsic from IR? >That's good enough. Thanks. On Mips16 I don't have an instruction for that so I think I need to ask that it be expanded, so I will try that tomorrow but I will need a small test case to put it back.> I don't think we have anything that will auto converting a loop to > ctlz or anything like that. We only seem to have a detection for > popcount loops. > > > On Thu, Aug 15, 2013 at 9:01 PM, reed kotler <rkotler at mips.com > <mailto:rkotler at mips.com>> wrote: > > Does anyone know some simple c/c++ code or .ll code which will > cause this ctlz pattern to be emitted? > > Tia. > > Reed > > > _______________________________________________ > 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 > > > > > -- > ~Craig-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130815/6d19761a/attachment.html>
Apparently Analagous Threads
- [LLVMdev] ctlz pattern
- Unfolded additions of constants after promotion of @llvm.ctlz.i16 on SystemZ
- Numeric vector converted mysteriously to characters in data frame?
- Early legalization pass ? Doing early legalization in an existing pass ?
- [LLVMdev] A simple question regarding LLVM intrinsics.