>> Repetitive code with lots of bitwise operations is compiled by LLVM into >> much larger code than the other compilers: >> >> http://embed.cs.utah.edu/embarrassing/jan_10/harvest/source/ED/ED37DAF5.shtml >> http://embed.cs.utah.edu/embarrassing/jan_10/harvest/source/1F/1F4003C7.shtml >> >> Note that this is straight-line code, so LLVM's output will run 4-5 >> times longer than everyone else's. >> >> I'll be interested to learn the source of this one. > > This looks like a one-off case; instcombine destroys the symmetry of > the code that the test harness duplicated by reducing the masking > constants. Probably too complicated for too little gain to be worth > pursuing.There are a bunch of these actually, I can try to make a list... John
On Tue, Jan 26, 2010 at 5:55 PM, John Regehr <regehr at cs.utah.edu> wrote:>>> Repetitive code with lots of bitwise operations is compiled by LLVM into >>> much larger code than the other compilers: >>> >>> >>> http://embed.cs.utah.edu/embarrassing/jan_10/harvest/source/ED/ED37DAF5.shtml >>> >>> http://embed.cs.utah.edu/embarrassing/jan_10/harvest/source/1F/1F4003C7.shtml >>> >>> Note that this is straight-line code, so LLVM's output will run 4-5 >>> times longer than everyone else's. >>> >>> I'll be interested to learn the source of this one. >> >> This looks like a one-off case; instcombine destroys the symmetry of >> the code that the test harness duplicated by reducing the masking >> constants. Probably too complicated for too little gain to be worth >> pursuing. > > There are a bunch of these actually, I can try to make a list...Umm, can you find one that isn't a popcount implementation? -Eli
> Umm, can you find one that isn't a popcount implementation?Ok. MMX psadbw instruction: http://embed.cs.utah.edu/embarrassing/jan_10/harvest/source/CE/CE3DA132.shtml Position of first set bit: http://embed.cs.utah.edu/embarrassing/jan_10/harvest/source/1F/1F4003C7.shtml Log2 floor: http://embed.cs.utah.edu/embarrassing/jan_10/harvest/source/83/837A80E9.shtml Pixel format conversion: http://embed.cs.utah.edu/embarrassing/jan_10/harvest/source/EC/EC3353C5.shtml John