Message ID | 20220210085310.GA19435@delia.home |
---|---|
State | New |
Headers | show |
Series | [committed,nvptx] Workaround sub.u16 driver JIT bug | expand |
diff --git a/gcc/config/nvptx/nvptx.md b/gcc/config/nvptx/nvptx.md index bb0c0b3b9a5..cced68e0d4a 100644 --- a/gcc/config/nvptx/nvptx.md +++ b/gcc/config/nvptx/nvptx.md @@ -506,7 +506,14 @@ (define_insn "sub<mode>3" (minus:HSDIM (match_operand:HSDIM 1 "nvptx_register_operand" "R") (match_operand:HSDIM 2 "nvptx_register_operand" "R")))] "" - "%.\\tsub%t0\\t%0, %1, %2;") + { + if (GET_MODE (operands[0]) == HImode) + /* Workaround https://developer.nvidia.com/nvidia_bug/3527713. + See PR97005. */ + return "%.\\tsub.s16\\t%0, %1, %2;"; + + return "%.\\tsub%t0\\t%0, %1, %2;"; + }) (define_insn "mul<mode>3" [(set (match_operand:HSDIM 0 "nvptx_register_operand" "=R")