[llvm] r265265 - [CodeGenPrepare] Fix r265264.
whitequark via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 3 12:38:23 PDT 2016
On 2016-04-03 21:58, Renato Golin wrote:
> Hi Peter,
>
> It did not fix the ARM bots... :)
Should be fixed in r265271--I restored the old behavior for non-fcmp
instructions and X86+ARM tests pass locally, too.
>
> http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15/builds/11146
>
> http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15/builds/11223
>
> http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/5918
>
> http://lab.llvm.org:8011/builders/clang-cmake-aarch64-42vma/builds/7192
>
> cheers,
> --renato
>
> On 3 April 2016 at 18:11, Peter Zotov via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>> Author: whitequark
>> Date: Sun Apr 3 12:11:53 2016
>> New Revision: 265265
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=265265&view=rev
>> Log:
>> [CodeGenPrepare] Fix r265264.
>>
>> The case where there was no TargetLowering was not handled,
>> leading to null pointer dereferences.
>>
>> Modified:
>> llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
>>
>> Modified: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp?rev=265265&r1=265264&r2=265265&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp Sun Apr 3 12:11:53 2016
>> @@ -910,8 +910,8 @@ static bool SinkCmpExpression(CmpInst *C
>> return MadeChange;
>> }
>>
>> -static bool OptimizeCmpExpression(CmpInst *CI, const TargetLowering
>> &TLI) {
>> - if (SinkCmpExpression(CI, TLI))
>> +static bool OptimizeCmpExpression(CmpInst *CI, const TargetLowering
>> *TLI) {
>> + if (TLI && SinkCmpExpression(CI, *TLI))
>> return true;
>>
>> if (CombineUAddWithOverflow(CI))
>> @@ -5177,7 +5177,7 @@ bool CodeGenPrepare::optimizeInst(Instru
>>
>> if (CmpInst *CI = dyn_cast<CmpInst>(I))
>> if (!TLI || !TLI->hasMultipleConditionRegisters())
>> - return OptimizeCmpExpression(CI, *TLI);
>> + return OptimizeCmpExpression(CI, TLI);
>>
>> if (LoadInst *LI = dyn_cast<LoadInst>(I)) {
>> stripInvariantGroupMetadata(*LI);
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
--
whitequark
More information about the llvm-commits
mailing list