This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Fix the assert of combineBVOfConsecutiveLoads when element num is 1
ClosedPublic

Authored by wuzish on Sep 13 2018, 9:58 PM.

Details

Summary

Building a vector out of multiple loads can be converted to a load of the vector type if the loads are consecutive. But the special condition is that the element number is 1, such as <1 x i128>. So just early exit to fix the assert.

Diff Detail

Repository
rL LLVM

Event Timeline

wuzish created this revision.Sep 13 2018, 9:58 PM
nemanjai accepted this revision.Sep 14 2018, 2:20 AM

Minor nit, but LGTM.

llvm/test/CodeGen/PowerPC/crash.ll
18 ↗(On Diff #165419)

Please add a comment:

;  A BUILD_VECTOR of 1 element caused a crash in combineBVOfConsecutiveLoads().
; Test that this is no longer the case.
This revision is now accepted and ready to land.Sep 14 2018, 2:20 AM

Add some comments in test cases.

Please help me to commit this patch. Thanks a lot.

I will commit the patch for you.

This revision was automatically updated to reflect the committed changes.

I will commit the patch for you.

Thank you