This patch fixes CLZ. It always returns SImode, we should look at the input
operand to determine the type. Fixes cc.c-torture/execute/builtin-bitops-1.c
committed.
nathan
2015-11-21 Nathan Sidwell <nat...@acm.org>
* config/nvptx/nvptx.md (clz<mode>2): Use operand 1 for type.
Index: config/nvptx/nvptx.md
===================================================================
--- config/nvptx/nvptx.md (revision 230704)
+++ config/nvptx/nvptx.md (working copy)
@@ -731,7 +731,7 @@
[(set (match_operand:SI 0 "nvptx_register_operand" "=R")
(clz:SI (match_operand:SDIM 1 "nvptx_register_operand" "R")))]
""
- "%.\\tclz.b%T0\\t%0, %1;")
+ "%.\\tclz.b%T1\\t%0, %1;")
(define_expand "ctz<mode>2"
[(set (match_operand:SI 0 "nvptx_register_operand" "")