https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97005
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #3) > Is some workaround possible, like instead of emitting cvt.u32.u16 do > cvt.u32.s16 and add explicit and? This already works: ... diff --git a/builtin-arith-overflow-15/src.cu b/builtin-arith-overflow-15/src.cu index 7a2535f..96f5f1e 100644 --- a/builtin-arith-overflow-15/src.cu +++ b/builtin-arith-overflow-15/src.cu @@ -46,6 +46,7 @@ hello (unsigned int *output) //"mov.u16 r33,0xff80;" "cvt.u32.u16 r35,r33;" + "and.b32 r35,r35,0x0000ffff;" //"mov.u32 r35, 0x0000ff80;" "st.u32 [rp], r35;" ... > Do other zero extends work correctly? I've rewritten the example to cvt.u64.u32, but that one passes fine. But cvt.u64.u16 runs into the same problem.