[llvm] a93b179 - [AArch64] Fix a warning

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 14 10:48:11 PST 2021


Hi David,

That's a better idea!  Committed as
ee99426c770605bd3eacc0d908a9b30e7f61dab9.  Thanks!

Kazu Hirata

On Mon, Dec 13, 2021 at 5:38 PM David Blaikie <dblaikie at gmail.com> wrote:

> Maybe it'd be better to roll the MRI.getType call into the assert and
> avoiding the named variable?
>
> On Fri, Dec 10, 2021 at 8:33 AM Kazu Hirata via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>>
>> Author: Kazu Hirata
>> Date: 2021-12-10T08:33:07-08:00
>> New Revision: a93b1792f1c8f7e2e7c931993110dc48f7ddba01
>>
>> URL:
>> https://github.com/llvm/llvm-project/commit/a93b1792f1c8f7e2e7c931993110dc48f7ddba01
>> DIFF:
>> https://github.com/llvm/llvm-project/commit/a93b1792f1c8f7e2e7c931993110dc48f7ddba01.diff
>>
>> LOG: [AArch64] Fix a warning
>>
>> This patch fixes:
>>
>>   llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp:315:7:
>>   error: unused variable 'ValTy' [-Werror,-Wunused-variable]
>>
>> Added:
>>
>>
>> Modified:
>>     llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
>>
>> Removed:
>>
>>
>>
>>
>> ################################################################################
>> diff  --git
>> a/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
>> b/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
>> index 5316a01b5ed94..bbf6720985b2c 100644
>> --- a/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
>> +++ b/llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
>> @@ -314,6 +314,7 @@ static void applySplitStoreZero128(MachineInstr &MI,
>> MachineRegisterInfo &MRI,
>>    GStore &Store = cast<GStore>(MI);
>>    LLT ValTy = MRI.getType(Store.getValueReg());
>>    assert(ValTy.isVector() && "Expected a vector store value");
>> +  (void)ValTy;
>>    LLT NewTy = LLT::scalar(64);
>>    Register PtrReg = Store.getPointerReg();
>>    auto Zero = B.buildConstant(NewTy, 0);
>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211214/e066844c/attachment.html>


More information about the llvm-commits mailing list