[AArch64] Removed unused i8 type from FPR8 register class.

Ana Pazos apazos at codeaurora.org
Thu Jan 23 16:08:04 PST 2014


Hi Tim,

 

We have been running some benchmarks with slp vectorizer and neon features
enabled.

 

We are getting crashes in MachineLICM::getRegisterClassIDAndCost related to
i8 type.

 

The i8 type is not registered with any register class, but it was included
in the FRP8 register class type list, I think unnecessarily, since i8 type
is not being used for printing any neon instruction.

 

The segmentation fault occurs because the code selects the first type
associated with register class FPR8, which happens to be i8.

 

It uses this type (i8) to get the representative class pointer, which is 0.
It then uses this pointer to access a field, resulting in segmentation
fault.

 

There are a couple of solutions:

-        the current patch removes i8 from FPR8 since it is not used anyways
(at least at the moment).

-        change order of types in FPR8 (make i8 the last type) - sounds
fragile still

-        change the code to retrieve the first type that has a valid
registered register class

 

I included a bugpoint-reduced test case if you want to reproduce the issue.

 

Please let me know what you think is best,

 

Thanks,

Ana.

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140123/13f03af4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-AArch64-Removed-unused-i8-type-from-FPR8-register-cl.patch
Type: application/octet-stream
Size: 3428 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140123/13f03af4/attachment.obj>


More information about the llvm-commits mailing list