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

--- Comment #22 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #21)
> Note I don't know how to easily to create a POLY_INT_CST  for riscv using
> their intrinsics. But I could learn by the time I implmenet the hook ...

There is no way to create a POLY_INT_CST at the gimple level for riscv as
__riscv_vlenb does not fold down to one but the testcase would have be:
Something like:
```
#include <riscv_vector.h>
#pragma GCC target("arch=rv64gc")
__attribute__((noinline))
static int g(int a)
{
  return a + 1;
}
#pragma GCC target("arch=rv64gcv")
int f(void) {
  int t = __riscv_vlenb();
  return g(t);
}
```

Reply via email to