This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv][math] Fix crash on unsupported types in math-to-spirv
ClosedPublic

Authored by kuhar on Nov 16 2022, 9:19 PM.

Diff Detail

Event Timeline

kuhar created this revision.Nov 16 2022, 9:19 PM
kuhar requested review of this revision.Nov 16 2022, 9:19 PM
antiagainst accepted this revision.Nov 17 2022, 10:40 AM
antiagainst added inline comments.
mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
80

Do we need to materialize a vector? Will llvm::concat work here?

This revision is now accepted and ready to land.Nov 17 2022, 10:40 AM
kuhar marked an inline comment as done.Nov 17 2022, 10:44 AM
kuhar added inline comments.
mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
80

Unfortunately yes because not all temporaries (the two ranges) will have their lifetimes extended throughout the for loop. This is a known bug in the C++ language: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2012r0.pdf

This revision was automatically updated to reflect the committed changes.
kuhar marked an inline comment as done.