This is an archive of the discontinued LLVM Phabricator instance.

[LLParser] Reader vector GEP ConsantExpr correctly
ClosedPublic

Authored by mkuper on Dec 20 2016, 6:18 PM.

Details

Summary

The CE version was too constrained - it seems like it was not relaxed enough when vector GEPs were introduces.
This relaxes the checks to be similar to the ones for the instruction version.

This fixes PR30816.

Diff Detail

Event Timeline

mkuper updated this revision to Diff 82191.Dec 20 2016, 6:18 PM
mkuper retitled this revision from to [LLParser] Reader vector GEP ConsantExpr correctly.
mkuper updated this object.
mkuper added reviewers: davide, delena.
mkuper added a subscriber: llvm-commits.
delena added inline comments.Dec 20 2016, 10:34 PM
lib/AsmParser/LLParser.cpp
3210

else

GEPWidth = ValNumEl;

If you add these 2 lines, you check that all indices have the same vector width.

mkuper added inline comments.Dec 21 2016, 9:31 AM
lib/AsmParser/LLParser.cpp
3210

Right, missed this (and, of course, I didn't add a negative test... serves me right.)
Thanks!

mkuper updated this revision to Diff 82244.Dec 21 2016, 10:03 AM

Added missing check.

delena accepted this revision.Dec 21 2016, 10:22 AM
delena edited edge metadata.
This revision is now accepted and ready to land.Dec 21 2016, 10:22 AM
This revision was automatically updated to reflect the committed changes.