https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119196
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The scalar is handled by match: (for code1 (eq ne) (for code2 (eq ne lt gt le ge) (simplify (bit_ior:c (code1:c@3 @0 @1) (code2:c@4 (convert?@c0 @0) @2)) (if ((TREE_CODE (@1) == INTEGER_CST && TREE_CODE (@2) == INTEGER_CST) || ((INTEGRAL_TYPE_P (TREE_TYPE (@1)) || POINTER_TYPE_P (TREE_TYPE (@1))) && bitwise_equal_p (@1, @2))) I suspsect s/INTEGRAL_TYPE_P/ANY_INTEGRAL_TYPE_P/ here is enough for integral types.