Hi,
there is a small oddity in gen_int_libfunc since 2007:
if (GET_MODE_CLASS (mode) != MODE_INT
|| mode < word_mode || GET_MODE_BITSIZE (mode) > maxsize)
return;
I don't think that modes are meant to be compared like that, so the attached
patch replaces the direct comparison with a comparison on GET_MODE_BITSIZE.
Tested on x86/Linux and PowerPC/Linux, OK for the mainline?
2013-12-09 Eric Botcazou <ebotca...@adacore.com>
* optabs.c (gen_int_libfunc): Do not compare modes directly.
--
Eric Botcazou
Index: optabs.c
===================================================================
--- optabs.c (revision 205774)
+++ optabs.c (working copy)
@@ -5506,7 +5506,8 @@ gen_int_libfunc (optab optable, const ch
if (maxsize < LONG_LONG_TYPE_SIZE)
maxsize = LONG_LONG_TYPE_SIZE;
if (GET_MODE_CLASS (mode) != MODE_INT
- || mode < word_mode || GET_MODE_BITSIZE (mode) > maxsize)
+ || GET_MODE_BITSIZE (mode) < BITS_PER_WORD
+ || GET_MODE_BITSIZE (mode) > maxsize)
return;
gen_libfunc (optable, opname, suffix, mode);
}