search for: mebbe_shift

Displaying 5 results from an estimated 5 matches for "mebbe_shift".

2008 Dec 17
2
[LLVMdev] Shifts that use only 5 LSBs.
...y value. If you > need consistent behavior, you should explicitly mask the shift amount > in the front-end. The problem here is that it looks like LLVM is introducing an expansion that assumes 32 bit shifts use more than 5 bits of the shift value. I created a simple test function: u64 mebbe_shift( u64 x, int test ) { if( test ) x <<= 2; return x; } I compile using clang, opt, and llc. I get something that, converted from my assembler to hasty psuedo-C: u64 mebbe_shift( u64 x, int test ) { int amt = test ? 2 : 0; x.hi = x.hi << amt | x.lo >> (32 - amt); x.lo &l...
2008 Dec 17
0
[LLVMdev] Shifts that use only 5 LSBs.
On Tue, Dec 16, 2008 at 5:20 PM, Daniel M Gessel <gessel at apple.com> wrote: > The problem here is that it looks like LLVM is introducing an expansion that > assumes 32 bit shifts use more than 5 bits of the shift value. > I created a simple test function: > u64 mebbe_shift( u64 x, int test ) > { > if( test ) > x <<= 2; > return x; > } > I compile using clang, opt, and llc. > I get something that, converted from my assembler to hasty psuedo-C: > u64 mebbe_shift( u64 x, int test ) > { > int amt = test ? 2 : 0; > x.hi = x.hi <&l...
2008 Dec 17
0
[LLVMdev] Shifts that use only 5 LSBs.
On Tue, Dec 16, 2008 at 3:36 PM, Daniel M Gessel <gessel at apple.com> wrote: > I'm working on a Target that only uses the 5 lsbs of the shift amount. Okay, that's quite common... x86 is the same. > I only have 32 bit registers, no 64 bit, so 64 bit math is emulated, > LLVM doing the transformations whenever I can get it to. x86 is the same. > I think I'm seeing a
2008 Dec 16
2
[LLVMdev] Shifts that use only 5 LSBs.
I'm working on a Target that only uses the 5 lsbs of the shift amount. I only have 32 bit registers, no 64 bit, so 64 bit math is emulated, LLVM doing the transformations whenever I can get it to. I think I'm seeing a case where it ultimately looks like a standard multiword shift (from e.g. Hacker's Delight) is being inline expanded that assumes at least 6 bits of the shift is
2008 Dec 18
2
[LLVMdev] Shifts that use only 5 LSBs.
...2008 at 5:20 PM, Daniel M Gessel <gessel at apple.com> > wrote: >> The problem here is that it looks like LLVM is introducing an >> expansion that >> assumes 32 bit shifts use more than 5 bits of the shift value. >> I created a simple test function: >> u64 mebbe_shift( u64 x, int test ) >> { >> if( test ) >> x <<= 2; >> return x; >> } >> I compile using clang, opt, and llc. >> I get something that, converted from my assembler to hasty psuedo-C: >> u64 mebbe_shift( u64 x, int test ) >> { >> int amt...