llvm/llvm-project

GlobalISel should have G_POISON

Open

#127,486 建立於 2025年2月17日

在 GitHub 查看
 (6 留言) (0 反應) (1 負責人)C++ (10,782 fork)batch import
good first issuellvm:globalisel

倉庫指標

Star
 (26,378 star)
PR 合併指標
 (平均合併 1天 2小時) (30 天內合併 1,000 個 PR)

描述

Currently GlobalISel has G_IMPLICIT_DEF, which acts like undef. This is used to lower both poison and undef from the IR. To mirror the semantics of the IR, we need a separate representation of poison. We should introduce G_POISON to enable better optimizations, particularly when legalization introduces padding vector elements.

This change would mostly be finding all the places G_IMPLICIT_DEF is handled, and equivalently handling G_POISON. We should then migrate vector widening and other transforms to introduce poison instead of undef.

貢獻者指南