[PATCH] D126204: Test stackmap support for floating point types.

Edd Barrett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 07:21:37 PDT 2022


vext01 created this revision.
vext01 added a reviewer: t.p.northover.
Herald added subscribers: pengfei, kbarton, nemanjai.
Herald added a project: All.
vext01 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is similar to D126069 <https://reviews.llvm.org/D126069>, but for floats.

It appears that float support is complete, or at least, the stackmap records emitted are not inconceivable (I must admit that I don't know about many of the architectures under test here).

One curiosity, the SystemZ tests highlight an undocumented (or maybe incorrect) quirk of the stackmap format: in the case of a `Register` record, the `Offset or SmallConstant` field can encode a sub-register index! I've only ever seen this field zero for `Register` entries up until now.

I found the code for this here <https://github.com/llvm/llvm-project/blob/a3a85fe59f489b7531e2852c1c573a26b18703b9/llvm/lib/CodeGen/StackMaps.cpp#L248-L253>

This surprised me, since the stackmap docs say:

> Each entry in the liveout register list contains a DWARF register number and size in bytes. The stackmap format deliberately omits specific subregister information. Instead the runtime must interpret this information conservatively.

It's not clear to me if this is talking only about liveouts, or the stackmap format as a whole. But given:

> For example, if the stackmap reports one byte at %rax, then the value may be in either %al or %ah.

without the sub-register info, how would you know where to look?

Anyway, that is one for another day. I'll raise an issue.


https://reviews.llvm.org/D126204

Files:
  llvm/test/CodeGen/AArch64/arm64-stackmap.ll
  llvm/test/CodeGen/AArch64/stackmap.ll
  llvm/test/CodeGen/PowerPC/ppc64-stackmap.ll
  llvm/test/CodeGen/SystemZ/stackmap.ll
  llvm/test/CodeGen/X86/stackmap.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126204.431359.patch
Type: text/x-patch
Size: 13377 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220523/11831a0f/attachment.bin>


More information about the llvm-commits mailing list