Then, sincos attempts to find the type of the IFN_SIN/IFN_COS via
mathfn_built_in_type. This fails, so the compiler crashes.
For these IFNs, their input type is the same as their output type, so
we can fall back to that.
Note that, currently, GCC can't seem to handle vector sincos/cexpi
operations, so any attempt to CSE these will fail quickly after. This
patch does not fix that, only the ICE that happens in the attempt.
gcc/ChangeLog:
* tree-ssa-math-opts.cc (execute_cse_sincos_1): If
mathfn_built_in_type fails to determine a type for our
operation, presume that it is the same as the input type.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/sincos-ice-on-ifn_sin-call.c: New test.
* gcc.target/gcn/sincos-ice-on-ifn_sin-call-1.c: New test.