This is an archive of the discontinued LLVM Phabricator instance.

[mlir][llvm] Add poison constant.
ClosedPublic

Authored by Moxinilian on Mar 22 2023, 7:28 AM.

Details

Summary

This patch introduces the poison constant from LLVM in the LLVM IR dialect. It also adds import and export support for it, along with roundtrip tests.

Diff Detail

Event Timeline

Moxinilian created this revision.Mar 22 2023, 7:28 AM
Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Moxinilian requested review of this revision.Mar 22 2023, 7:28 AM
gysit accepted this revision.Mar 22 2023, 7:53 AM

I suggest to update the commit title / message to "Introduce poison operation" since it is actually an operation in MLIR.

mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
1676

nit: I think "wrapping an LLVM IR structure type" can be dropped here?

mlir/test/Dialect/LLVMIR/roundtrip.mlir
445

nit: Let's use a bit longer variable names in the tests. Here I would suggest:
x -> UNDEF
y -> POISON

This revision is now accepted and ready to land.Mar 22 2023, 7:53 AM

Address comments.

This revision was landed with ongoing or failed builds.Mar 23 2023, 12:09 AM
Closed by commit rGa35f9c6e0813: [mlir][llvm] Add poison constant. (authored by Moxinilian, committed by gysit). · Explain Why
This revision was automatically updated to reflect the committed changes.