[Bug tree-optimization/110915] vector version of `x == MIN & x > y` is not optimized

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Aug 5 17:25:28 GMT 2023


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110915

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
These should work, I think, will try after finishing up the pointer:
(match min_value
 VECTOR_CST
 (with { tree inner = uniform_integer_cst_p (t); }
  (if (inner
       && INTEGRAL_TYPE_P (TREE_TYPE (inner))
       && wi::eq_p (wi::to_wide (inner), wi::min_value (TREE_TYPE (inner))))
  )
 )
)

(match max_value
 VECTOR_CST
 (with { tree inner = uniform_integer_cst_p (t); }
  (if (inner
       && INTEGRAL_TYPE_P (TREE_TYPE (inner))
       && wi::eq_p (wi::to_wide (inner), wi::max_value (TREE_TYPE (inner))))
  )
 )
)


More information about the Gcc-bugs mailing list