[Hexagon] Do not check alignment for unsized types in isLegalAddressingMode
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Wed, 3 Aug 2016 15:06:18 +0000 (15:06 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Wed, 3 Aug 2016 15:06:18 +0000 (15:06 +0000)
commited4e7827bbddd281a8241b603a5825f7842ba1de
tree90fc294017f6573343b0b2601bf21bbb34b49fb6
parentc9d9b31ba70f330a7e736926ff5253e5c2793999
[Hexagon] Do not check alignment for unsized types in isLegalAddressingMode

When the same base address is used to load two different data types, LSR
would assume a memory type of "void". This type is not sized and has no
alignment information. Checking for it causes a crash.

llvm-svn: 277601
llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
llvm/test/CodeGen/Hexagon/is-legal-void.ll [new file with mode: 0644]