[PATCH][LoopStrengthReduce] Don't trim a formula that uses a subset of required registers

Adam Nemet anemet at apple.com
Mon Apr 28 16:26:30 PDT 2014


On Apr 28, 2014, at 4:09 PM, Adam Nemet <anemet at apple.com> wrote:

> 
> On Apr 28, 2014, at 3:55 PM, Chandler Carruth <chandlerc at google.com> wrote:
> 
>> 
>> On Fri, Apr 25, 2014 at 1:39 PM, Andrew Trick <atrick at apple.com> wrote:
>> Adam,
>> 
>> This fix looks great to me! Please go ahead and commit.
>> 
>> Andy, how does this look good? ;]
>> 
>> --- /dev/null
>> +++ b/test/Transforms/LoopStrengthReduce/ARM64/req-regs.c
>> @@ -0,0 +1,36 @@
>> +// RUN: clang %s -O3 -target arm64-apple-ios -o - -S -mllvm -debug-only=loop-reduce 2>&1| FileCheck %s
>> +// REQUIRES: asserts
>> +
>> +// LSR used to fail here due to a bug in the ReqRegs test.  To complicate
>> +// things, this could only be reproduced with clang because the uses would
>> +// come out in different order when invoked through llc.
>> +
>> +// CHECK: The chosen solution requires
>> +// CHECK-NOT: No Satisfactory Solution
>> 
>> This test runs clang, from the users PATH, with -O3, in an LLVM test. This doesn't work *at all*.
>> 
>> That really doesn't work. Mind reverting until you have a reduced test case? This is blocking us, so I'd like to get it fixed ASAP.
> 
> I’ll revert the test case until we investigate but clang does get substituted in test/lit.cfg.  For me the test runs as:
> 
> /Users/anemet/proj/org/llvm/build/Debug+Asserts/bin/clang /Users/anemet/proj/org/llvm/test/Transforms/LoopStrengthReduce/ARM64/req-regs.c -O3 -target arm64-apple-ios -o - -S -mllvm -debug-only=loop-reduce 2>&1| /Users/anemet/proj/org/llvm/build/Debug+Asserts/bin/FileCheck /Users/anemet/proj/org/llvm/test/Transforms/LoopStrengthReduce/ARM64/req-regs.c
> 
> with:
> 
> /org/llvm/build$ which clang
> /usr/bin/clang
> 
> Adam

Chandler,

Can you please see why the substitution does not work on your end?  As I mentioned above it’s there in the code and it works for me… 

Adam

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140428/d4231707/attachment.html>


More information about the llvm-commits mailing list