search for: ctlz

Displaying 20 results from an estimated 55 matches for "ctlz".

Did you mean: ctl
2013 Aug 16
2
[LLVMdev] ctlz pattern
Does anyone know some simple c/c++ code or .ll code which will cause this ctlz pattern to be emitted? Tia. Reed
2019 Feb 08
2
Unfolded additions of constants after promotion of @llvm.ctlz.i16 on SystemZ
Hi, SystemZ supports @llvm.ctlz.i64() natively with a single instruction (FLOGR), and lesser bitwidth versions of the intrinsic are promoted to i64. For some reason, this leads to unfolded additions of constants as shown below: This function: define i16 @fun(i16 %arg) {   %1 = tail call i16 @llvm.ctlz.i16(i16 %arg, i1 false...
2013 Aug 16
0
[LLVMdev] ctlz pattern
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++ c...
2017 Jan 23
2
Early legalization pass ? Doing early legalization in an existing pass ?
Hi all, Some non trivial legalization of operations which aren't supported by the backend would benefit from having the optimizer pass on them. I noticed some example trying to optimize various pieces of code over the past weeks. One offender is the cttz/ctlz intrinsic when defined on 0. On X86, BSR and NSF are undefined on 0, and only recent CPU have the LZCNT and TZCNT instructions that are properly defined for 0. The backend insert code with a branch that checks for 0 and use bsf/bsr or just use a constant. But if we are to branch anyway, and one pa...
2017 Jan 24
3
Early legalization pass ? Doing early legalization in an existing pass ?
...omething that is more likely to prevent optimizations than it is to encourage them. But I guess I don't follow why things like TTI, TII and TLI queries don't suffice for this. CodeGenPrepare will break this sequence up. I would imagine that if the target returns false for isCheapToSpeculateCtlz() and false for canInsertSelect(), the code would look the way you'd like it to. But as I said, I'm mostly speculating here and I might be very wrong. On Mon, Jan 23, 2017 at 5:02 PM, via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > > On Jan 23, 2017, at 4:06 AM, Amaur...
2006 Jan 16
0
[LLVMdev] Intrinsics Change
...start seeing warnings about the names of intrinsics that need to be upgraded in the front end. Here are the intrinsics that need to be changed: llvm.bswap -> llvm.bswap.i16, llvm.bswap.i32, llvm.bswap.i64 llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64 llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64 llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64 llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64 llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64 Thanks, Reid. -------------- next part --...
2011 Jul 08
0
[LLVMdev] LLVM on ARM testing.
On Fri, Jul 8, 2011 at 9:30 AM, Karel Gardas <karel.gardas at centrum.cz> wrote: > On 07/ 8/11 05:26 PM, Eli Friedman wrote: >> >> Given that revision range, the only remotely likely culprit is 131463. >>  Which basically means that it "broke" because the default target >> features changed. > > And you are right here. 131463 == 131464 which is
2011 Jul 08
3
[LLVMdev] LLVM on ARM testing.
On 07/ 8/11 05:26 PM, Eli Friedman wrote: > Given that revision range, the only remotely likely culprit is 131463. > Which basically means that it "broke" because the default target > features changed. And you are right here. 131463 == 131464 which is buggy. 131462 is OK. Thanks, Karel
2019 Jun 10
2
Bug: Library functions for ISD::SRA, ISD::SHL, and ISD::SRL
Hi Eli, Thanks for pointing to the CTLZ_ZERO_UNDEF “LibCall” implementation. I have not it in the version that I am currently using, so it’s nice to know that it’s implemented now. Incidentally, the CTLZ… implementation is IDENTICAL to what I am proposing for the Shifts. This is not just adding support for “out-of-tree-targets”, but gi...
2019 Jun 10
2
Bug: Library functions for ISD::SRA, ISD::SHL, and ISD::SRL
...RTLIB::SRA_I16, RTLIB::SRA_I16, RTLIB::SRA_I32, RTLIB::SRA_I64, RTLIB::SRA_I128)); I think this is a BUG by omission of necessary switch cases. Similarly, the following ISD codes ISD::CTTZ, ISD::CTLZ, ISD::CTPOP do not define any Library calls, despite LLVM being able to fully expand them into rather large code for targets that do not natively implement them. I regard this also as an omission/bug, because not all targets would benefit from the custom expansion of these ISD codes, which as said...
2019 Mar 26
2
Implement LLVM Intrinsics in C/LLVM IR
Hello, I am basically working on a static analysis project on LLVM IR, and the problem is that I will need to simulate the execution of a few LLVM Intrinsic, such as llvm.bswap.i160, and llvm.ctlz.i256. I am wondering if there has been some already implemented sample code, regarding these intrinsics? Either C or LLVM IR. Thanks a lot! Best, -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190326/4c442...
2018 Jul 03
2
Using FileCheck in unit tests
...he motivating issue as I understand it is that there's portions of GlobalISel that will be needed by targets in the future but aren't used by the current set of targets that support GlobalISel. For example, of the various actions (widenScalar, narrowScalar, Lower, etc.) that can be taken on CTLZ, most of the current GlobalISel targets declare CTLZ legal for almost all the types they encounter in practice. Instead of leaving the other paths untested or unimplemented, you wanted to be able to test those parts of GlobalISel even though we lack a target that would allow us to test it with llc....
2010 Jan 15
2
[LLVMdev] [PATCH] Emit rbit, clz on ARM for __builtin_ctz
...have a clz and bitreverse >> instruction but not ctz) are AVR32 and C64x, neither of which llvm >> has backends for yet. > > When/if another target wants this, we could add a ISD::RBIT operation, > it doesn't need to be added at the llvm ir level, The XCore also has ctlz and bitreverse instructions and not cttz. At the moment in the XCore backend cttz is marked as legal and expanded to this pair of instructions in a pattern in the InstrInfo.td. -- Richard Osborne | XMOS http://www.xmos.com
2019 Mar 26
2
Implement LLVM Intrinsics in C/LLVM IR
...:03 PM div code <divsubmission at gmail.com> wrote: > >> Hello, >> >> I am basically working on a static analysis project on LLVM IR, and the >> problem is that I will need to simulate the execution of a few LLVM >> Intrinsic, such as llvm.bswap.i160, and llvm.ctlz.i256. >> >> I am wondering if there has been some already implemented sample code, >> regarding these intrinsics? Either C or LLVM IR. Thanks a lot! >> >> Best, >> > _______________________________________________ > LLVM Developers mailing list > llvm-de...
2019 Jun 11
2
Bug: Library functions for ISD::SRA, ISD::SHL, and ISD::SRL
...t; Sent: Monday, June 10, 2019 3:05 PM > To: Eli Friedman <efriedma at quicinc.com> > Cc: llvm-dev <llvm-dev at lists.llvm.org> > Subject: [EXT] Re: [llvm-dev] Bug: Library functions for ISD::SRA, ISD::SHL, and ISD::SRL > > Hi Eli, > > Thanks for pointing to the CTLZ_ZERO_UNDEF “LibCall” implementation. I have not it in the version that I am currently using, so it’s nice to know that it’s implemented now. > > Incidentally, the CTLZ… implementation is IDENTICAL to what I am proposing for the Shifts. This is not just adding support for “out-of-tree-targe...
2009 Feb 26
1
[LLVMdev] A simple question regarding LLVM intrinsics.
...e "experimental" MIPS back end. Anyway, my question is rather simple but somehow I did not find a quick answer to it in the documentation. What I want to know, is how can the llvm.<something> intrinsics be used by the application programmer. As a simple example take the llvm.ctlz intrinsic. How does one use it from C program ?? I guess there must be a ".h" file somewhere which defines some of those intrinsics for "C" and maybe some modification for the llvm-gcc frontend is involved... The question is more general. I guess some of the intrinsics are...
2010 Jan 15
0
[LLVMdev] [PATCH] Emit rbit, clz on ARM for __builtin_ctz
...;> instruction but not ctz) are AVR32 and C64x, neither of which llvm >>> has backends for yet. >> >> When/if another target wants this, we could add a ISD::RBIT >> operation, >> it doesn't need to be added at the llvm ir level, > > The XCore also has ctlz and bitreverse instructions and not cttz. At > the moment in the XCore backend cttz is marked as legal and expanded > to this pair of instructions in a pattern in the InstrInfo.td. In that case, perhaps it makes sense to add it as an ISD::RBIT operation straight away. The rest of the...
2010 Jan 18
1
[LLVMdev] [PATCH] Emit rbit, clz on ARM for __builtin_ctz
...are AVR32 and C64x, neither of which llvm >>>> has backends for yet. >>> >>> When/if another target wants this, we could add a ISD::RBIT >>> operation, >>> it doesn't need to be added at the llvm ir level, >> >> The XCore also has ctlz and bitreverse instructions and not cttz. At >> the moment in the XCore backend cttz is marked as legal and expanded >> to this pair of instructions in a pattern in the InstrInfo.td. > > In that case, perhaps it makes sense to add it as an ISD::RBIT > operation straight...
2020 Jul 05
8
[RFC] carry-less multiplication instruction
...tion. It takes two integer operands of the same width, and returns an integer with twice the width of the operands. (Is there a good reason to make these the same width, as all the other operations do even when it doesn’t really make sense for the mathematical operation–like multiplication or ctpop/ctlz/cttz?)</p><p>If the CPU does not have a dedication clmul operation, it can be lowered to regular multiplication, by using holes to avoid carrys.</p><p>==Where is clmul used?==</p><p>While somewhat specialized, the RISC-V manual documents many uses: [2]</p>&...
2017 Jun 06
2
Change undef to poison in a few operations
...ng from undef to poison: - insertelement/extractelement (element index out of range) - shufflevector (undef elements in shuffle mask) - alloca (allocating zero bytes) ? - load (load value with different type from written value) - GEP inrange - fptrunc/fptoui/fptosi/uitofp/sitofp (overflow) ? - llvm.ctlz.* and friends (is_zero_undef) ? Some of these are no brainers, others may need a bit of discussion. Please let us know if you have thoughts and/or concerns about this. Thanks, Nuno