[llvm-commits] [patch][pr11029] fix for internal crash due to ExpandUnalignedLoad/Store not handling indexed loads correctly

Kristof Beyls kristof.beyls at arm.com
Fri Oct 28 04:06:49 PDT 2011


After the changes in r143177, the patch needed to be adapted.
I've adapted the patch so that it works with current head of trunk, see
attachment.

Thanks,

Kristof

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu
[mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Kristof Beyls
Sent: 26 October 2011 16:40
To: llvm-commits at cs.uiuc.edu
Subject: [llvm-commits] [patch][pr11029] fix for internal crash due to
ExpandUnalignedLoad/Store not handling indexed loads correctly

The attached patch fixes PR11029 (
http://llvm.org/bugs/show_bug.cgi?id=11029 ).

The root cause of the problem seems to be that ExpandUnalignedLoad and
ExpandUnalignedStore doesn't handle indexed loads or stores correctly.

There seem to be 2 possible ways to fix this:
1. Implement support for indexed loads/stores in the above functions.
2. Don't generate indexed load/stores in cases where these will need to be
expanded.

The attached patch implements the second approach. The reasons for going
with the second approach are:
* The generation of indexed loads/stores seems to be an optimization. The
second approach chooses not to do the optimization when it's not supported.
* There will not be a regression in code generation, since in the cases that
the patch prohibits optimization, the compiler would crash or generate
incorrect code with a high probability.
* It's unclear whether generating indexed loads/stores for unaligned
loads/stores that need expanding would actually result in better quality of
the generated code.

Could someone review the patch and commit it if fine?

Thanks,

Kristof
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr11029_fix_r143186.patch
Type: application/octet-stream
Size: 8735 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111028/5cf80517/attachment.obj>


More information about the llvm-commits mailing list