[NVPTX] Support float <-> 2 x half bitcasts
authorJakub Chlanda <j.chlanda@gmail.com>
Mon, 25 Apr 2022 21:22:22 +0000 (14:22 -0700)
committerArtem Belevich <tra@google.com>
Mon, 25 Apr 2022 21:37:41 +0000 (14:37 -0700)
commit76d1f5eaa87b3d1ae5f4c07114313350152c24f2
tree5dd8caff2e799f13ddb17cb98d96e569678c061b
parent993054c1c960215f8486e463aacd650cd3a6661e
[NVPTX] Support float <-> 2 x half bitcasts

Make sure NVPTX backend can handle bitcasting between `float` and `<2 x half>` types.

This was discovered through: https://github.com/intel/llvm/issues/5969
I'm not suggesting that such bitcasts make much sense, but it feels like the compiler should not hard crash on them.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D124171
llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
llvm/test/CodeGen/NVPTX/f16x2-instructions.ll