search for: isnotnegativeusingcmp

Displaying 3 results from an estimated 3 matches for "isnotnegativeusingcmp".

2019 Nov 13
2
[AVR] [MSP430] Code gen improvements for 8 bit and 16 bit targets
...you'd have a better chance of finding an answer. Let's take a minimal example starting in C and compiling for MSP430 since that's what we have used as a public approximation of your target: short isNotNegativeUsingBigShift(short x) { return (unsigned short)(~x) >> 15; } short isNotNegativeUsingCmp(short x) { return x > -1; } Currently, we will canonicalize these to the shift form (but you could argue that is backwards). Alive proof for logical equivalence: https://rise4fun.com/Alive/uGH If we disable the instcombine for this, we would have IR like this: define signext i16 @isNotNegat...
2019 Nov 14
2
[AVR] [MSP430] Code gen improvements for 8 bit and 16 bit targets
...an answer. > > Let's take a minimal example starting in C and compiling for MSP430 since > that's what we have used as a public approximation of your target: > > short isNotNegativeUsingBigShift(short x) { > return (unsigned short)(~x) >> 15; > } > > short isNotNegativeUsingCmp(short x) { > return x > -1; > } > > Currently, we will canonicalize these to the shift form (but you could > argue that is backwards). > Alive proof for logical equivalence: > https://rise4fun.com/Alive/uGH > > If we disable the instcombine for this, we would have IR...
2019 Nov 13
2
[AVR] [MSP430] Code gen improvements for 8 bit and 16 bit targets
On Wed, Nov 13, 2019 at 12:26 PM Joan Lluch via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi All, > > In relation to the subject of this message I got my first round of patches successfully reviewed and committed. As a matter of reference, they are the following: > > https://reviews.llvm.org/D69116 > https://reviews.llvm.org/D69120 >