search for: cmps

Displaying 20 results from an estimated 28 matches for "cmps".

Did you mean: cmpl
2017 Jul 13
2
failing to optimize boolean ops on cmps
We have several optimizations in InstCombine for bitwise logic ops (and/or/xor) that fail to handle compare patterns with the equivalent bitwise logic. Example: define i8 @or_and_not(i8 %a, i8 %b) { %nota = xor i8 %a, -1 %and = and i8 %nota, %b %res = or i8 %and, %a ret i8 %res } define i1 @or_and_cmp_not(i32 %a, i32 %b, i1 %c) { %cmp = icmp sgt i32 %a, %b %cmp_inv = icmp sle i32 %a,
2017 Jul 15
2
failing to optimize boolean ops on cmps
On 07/14/2017 11:46 AM, Hal Finkel via llvm-dev wrote: > > > On 07/14/2017 01:38 PM, Daniel Berlin wrote: >> >> >> Not sure about this last part. It is really going to require work >> by us to rewrite things. :-) In the mean time, I think we should >> go ahead with this. >> >> >> FWIW: My problem is, when put in this framework,
2017 Jul 14
2
failing to optimize boolean ops on cmps
Going back to the original problem. Why shouldn't SimplifyUsingDistributiveLaws handle both these cases? For the bitwise test case if you distribute you get (~A | A) & (B | A) The left side of that simplifies to all 1s which is the identify value for and. So even though the right side doesn't simplify it's a win. ~Craig On Fri, Jul 14, 2017 at 11:46 AM, Hal Finkel via llvm-dev
2017 Jul 14
2
failing to optimize boolean ops on cmps
On 07/14/2017 10:27 AM, Daniel Berlin wrote: > > > On Thu, Jul 13, 2017 at 6:18 PM, Hal Finkel <hfinkel at anl.gov > <mailto:hfinkel at anl.gov>> wrote: > > > On 07/13/2017 06:40 PM, Daniel Berlin via llvm-dev wrote: >> Ah yes, it can only return one instruction and you need two. >> >> NewGVN could still handle it if instsimplify was
2017 Jul 14
5
failing to optimize boolean ops on cmps
> > > Not sure about this last part. It is really going to require work by us to > rewrite things. :-) In the mean time, I think we should go ahead with this. > FWIW: My problem is, when put in this framework, we will repeatedly make this same decision, this same way, again and again, and never actually get even started on fixing it :) IE "it's just another small
2017 Jul 13
2
failing to optimize boolean ops on cmps
This can't be an instsimplify though? The values we want in these cases do not exist already: %res = or i8 %b, %a %res = or i1 %cmp, %c On Thu, Jul 13, 2017 at 5:10 PM, Daniel Berlin <dberlin at dberlin.org> wrote: > > > On Thu, Jul 13, 2017 at 2:12 PM, Sanjay Patel <spatel at rotateright.com> > wrote: > >> We have several optimizations in InstCombine
2017 Jul 14
3
failing to optimize boolean ops on cmps
On Fri, Jul 14, 2017 at 10:54 AM, Daniel Berlin <dberlin at dberlin.org> wrote: > > >> I think you're done when you get everything that you have that fits into >> a model of local transformations and that should be run to a fixed point. >> > > Sure, but to point out what you certainly already know, that's almost > every optimization you can think of
2017 May 19
5
[llvm] r303387 - [InstCombine] add more tests for xor-of-icmps; NFC
..., I'm still not entirely convinced >> `InstCombine` should handle these cases given it's already a >> compile-time sink? >> > > Correct me where I'm going wrong. 1. We got a bug report with a perf regression that was root caused to this IR: define i1 @xor_of_icmps(i64 %a) { %b = icmp sgt i64 %a, 0 %c = icmp eq i64 %a, 1 %r = xor i1 %b, %c ret i1 %r } Because this was a regression, we know that the optimal/canonical IR for this program is: define i1 @xor_of_icmps_canonical(i64 %a) { %r = icmp sgt i64 %a, 1 ret i1 %r } 2. I sa...
2017 Jul 14
2
failing to optimize boolean ops on cmps
On 07/13/2017 06:40 PM, Daniel Berlin via llvm-dev wrote: > Ah yes, it can only return one instruction and you need two. > > NewGVN could still handle it if instsimplify was changed to return the > right binary operators because it has infrastructure that can handle > insertion. > (it would need a little work). > > > (At this point, InstCombine seems to have become
2011 Jul 05
3
[LLVMdev] optimizer returning wrong variable?
I'm having some trouble trying to workout how to form functions from the c interface I thought I had it sorted but I guess I'm missing something or haven't understood the requirements, a case of trial and error and not really having a clue to start with! I've got binary ops, cmps, for loops, while loops working but then it hit the wall with a tail cmp loop. looking at the output from the c interface it looks ok to me but the optimizer is returning the wrong variable I don't know what to do to avoid it? source language input Procedure TRU(a,b) Protected x,y,c Re...
2011 Jul 05
0
[LLVMdev] optimizer returning wrong variable?
...trying to workout how to form functions from > the c interface > I thought I had it sorted but I guess I'm missing something or haven't > understood > the requirements, a case of trial and error and not really having a clue > to start with! > > I've got binary ops, cmps, for loops, while loops working but then it > hit the > wall with a tail cmp loop. > > looking at the output from the c interface it looks ok to me > but the optimizer is returning the wrong variable > I don't know what to do to avoid it? I don't see the problem. In your...
2015 Jul 22
3
[LLVMdev] some superoptimizer results
...ces, but most of > the transformations in the link seem to be things that, if applicable, > we would want to do in the backend instead of in the middle-end. Looking through the items, I see a number which are suitable for mid level canonicalization. For example, the two for converting and/cmps into truncs seem like good candidates. We need to make sure to apply judgement here, but not *all* of these are backend specific. > > -- Sean Silva > > > -Hal > > ----- Original Message ----- > > From: "Sean Silva" <chisophugis at gmail.com...
1999 Mar 05
0
configure and compile errors under HPUX9.04 with samba 2.03
...#13] (warning) Use of GR3 when frame>=8192 may cause conflict as: /usr/tmp/cca10599.s @line#1175 [err#13] (warning) Use of GR3 when frame>=8192 may cause conflict Samba seems to work correctly, just wonder if I should worry, or the code needs to be modified. Thanks! Steve Grose Sgrose@cmps.com Continental Managed Pharmacy Services - www.mimhp.com Voice - 216-459-2025 Ext. 208 Fax - 216-485-8615 Any opinions expressed are my own and not necessarily those of my employers.
1999 Jun 14
1
msclient and Case
...case = yes" to permit long filenames to retain their case, while short names are lowered. Default Yes Although both are defaulted to yes, I was hoping that msclient has a switch to toggle the case. Just might be too sophisticated for MSCLIENT though. :) Thanks In Advance! Steve Grose Sgrose@cmps.com Continental Managed Pharmacy Services - www.mimhp.com Voice - 216-459-2025 Ext. 208 Fax - 216-485-8615 Any opinions expressed are my own and not necessarily those of my employers.
2012 Jun 07
1
[LLVMdev] Instruction Cleanup Questions
On Jun 7, 2012, at 1:42 PM, Hal Finkel <hfinkel at anl.gov> wrote: > On PPC, normal moves are encoded as OR instructions where the two > operands being ORed together are the same. These self moves, as it > turns out, come from things like this: > > %vreg18<def> = OR8To4 %vreg16, %vreg16; GPRC:%vreg18 G8RC:%vreg16 > > This is generated from the pattern: >
2014 Feb 11
2
[LLVMdev] [RFC] Simple control-flow integrity
...d target addresses instead? > > > Can a bloom filter be as fast as a simple bounds check? I'm thinking lea > base, sub, cmp, jl, and cold call. Exactly. The jump table turns into a very small amount of code; note that a normal bounds check has to check both bounds (so two subs and cmps). With the base and mask, and in an asm pseudo-code, it does: sub base, addr and mask, addr add base, addr cmp addr, orig je normal_call <load info for warning call> call warning normal_call: call orig And if you can get sufficient power-of-two alignment for the table, you can do even bet...
2018 Mar 22
0
Compile time from IR
...s eliminated 591 codegenprepare - Number of memory instructions whose address computations were sunk 801 codegenprepare - Number of uses of Cast expressions replaced with uses of sunken Casts 203 codegenprepare - Number of uses of Cmp expressions replaced with uses of sunken Cmps 315089 dagcombine - Number of dag nodes combined 135493 isel - Number of blocks selected using DAG 695 isel - Number of entry blocks encountered 9853322 isel - Number of times dag isel has to try another path The top of the pass execution tab...
2011 Mar 08
3
[LLVMdev] Vector select/compare support in LLVM
Hello, I started working on adding vector support for the SELECT and CMP instructions in the codegen (bugs: 3384, 1784, 2314).  Currently, the codegen scalarizes vector CMPs into multiple scalar CMPs.  It is easy to add similar scalarization support to the SELECT instruction.  However, using multiple scalar operations is slower than using vector operations. In LLVM, vector-compare operations generate a vector of i1s, and the vector-select instruction uses these vector...
2006 Jun 26
0
[klibc 23/43] cris support for klibc
...are passed in $mof and $srp; however, we have + * to save $srp around the system call. + */ + + .section ".text","ax" + .balign 4 + .globl __syscall_common + .type __syscall_common, at function +__syscall_common: + push $srp + move [$sp+4],$mof + move [$sp+8],$srp + break 13 + + cmps.w -4096,$r10 + blo 1f + neg.d $r10,$r11 + move.d $r11,[errno] + moveq -1,$r10 +1: + pop $srp + ret + nop + + .size __syscall_common,.-__syscall_common diff --git a/usr/klibc/arch/cris/sysstub.ph b/usr/klibc/arch/cris/sysstub.ph new file mode 100644 index 0000000..182ad73 --- /dev/null +++ b/usr/kli...
2020 Apr 30
0
[klibc:master] arch: Remove cris port
...are passed in $mof and $srp; however, we have - * to save $srp around the system call. - */ - - .section ".text","ax" - .balign 4 - .globl __syscall_common - .type __syscall_common, at function -__syscall_common: - push $srp - move [$sp+4],$mof - move [$sp+8],$srp - break 13 - - cmps.w -4096,$r10 - blo 1f - neg.d $r10,$r11 - move.d $r11,[errno] - moveq -1,$r10 -1: - pop $srp - ret - nop - - .size __syscall_common,.-__syscall_common diff --git a/usr/klibc/arch/cris/sysstub.ph b/usr/klibc/arch/cris/sysstub.ph deleted file mode 100644 index 182ad73f..00000000 --- a/usr/klibc/arch/...