Page MenuHomePhabricator

[WebAssembly] Fix allocsize attribute in sjlj lowering
ClosedPublic

Authored by loladiro on Jul 30 2019, 12:17 PM.

Details

Summary

The allocsize attribute refers to call parameters by index.
Thus, when we add the extra parameter in sjlj lowering, we
need to increment the referenced paramater in the allocsize
attribute to avoid angering the Verifier.

Event Timeline

loladiro created this revision.Jul 30 2019, 12:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 30 2019, 12:17 PM
aheejin accepted this revision.Jul 30 2019, 10:30 PM
This comment was removed by aheejin.
llvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
207

Real nit: Doesn't matter for this test case, but maybe it would make more sense for this file to return i8*, because it has allocsize attribute

This revision is now accepted and ready to land.Jul 30 2019, 10:30 PM

Thank you for fixing this too!

(I added D65463 as a parent revision by mistake and deleted it, sorry; I was confused and thought this was related to that CL first, but this is not)

This revision was automatically updated to reflect the committed changes.