This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Fix DenseElementsAttr treatment of bool splat of "true"
ClosedPublic

Authored by rriddle on Sep 12 2022, 7:22 PM.

Details

Summary

Boolean splats currently can't roundtrip via the "raw" DenseElementsAttr
API. This is because internally we treat true splats in some cases as "1"(one bit set)
and in other cases as "0xFF"(all bits set). This commit cleans up this handling to
consistently use 0xFF (all bits set) as the value for a splat of true.

Depends on D133460

Diff Detail

Event Timeline

rriddle created this revision.Sep 12 2022, 7:22 PM
rriddle requested review of this revision.Sep 12 2022, 7:22 PM
jpienaar accepted this revision.Sep 12 2022, 9:00 PM

Roundtripping catching bugs :)

This revision is now accepted and ready to land.Sep 12 2022, 9:00 PM