[PATCH] D40604: [GlobalISel][IRTranslator] Fix crash during translation of zero sized loads and stores
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 29 09:59:10 PST 2017
Sounds like the proposed patch is the right thing to do then :).
> On Nov 29, 2017, at 9:55 AM, Amara Emerson <aemerson at apple.com> wrote:
>
> SDAGBuilder doesn’t create anything for loads and stores if the operands are zero size.
>
> Amara
>
>> On Nov 29, 2017, at 5:40 PM, Quentin Colombet <qcolombet at apple.com> wrote:
>>
>> What does SDISel do in those situations?
>>
>>> On Nov 29, 2017, at 9:27 AM, Amara Emerson via Phabricator via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>>
>>> aemerson added inline comments.
>>>
>>>
>>> ================
>>> Comment at: lib/CodeGen/GlobalISel/IRTranslator.cpp:340-341
>>>
>>> + if (DL->getTypeStoreSize(LI.getType()) == 0)
>>> + return true;
>>> +
>>> ----------------
>>> dsanders wrote:
>>>> I'm not sure this is correct for the load. If the load result has a use then I'd expect -verify-machineinstrs to complain about a missing def. I think we need to emit an IMPLICIT_DEF.
>>> That would require getting an LLT for a zero size type to create a vreg and running into the initial cause of the crash.
>>>
>>> Also, is there anything meaningful you can do with the load result? You can't bitcast it to anything (I think?) and storing it won't result in a store being generated, so no instructions are emitted for the verifier.
>>>
>>>
>>> Repository:
>>> rL LLVM
>>>
>>> https://reviews.llvm.org/D40604
>>>
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
More information about the llvm-commits
mailing list