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

--- Comment #2 from Avinash Jayakar <avinashd at gcc dot gnu.org> ---
Here is the link to reduced test case:
https://godbolt.org/z/57Wzd6daK

There are 2 ways to ensure the results are correct in both LE and BE systems.

1. 
- Reverse the input (not swapd, but reverse the bytes) 
- Compute xxgenpcvm
- Reverse the output and store results

2.
- No need to reverse anything
- Use immediate values 2 if input immediate value is 0, and 1 if input is 3 in
LE systems.

Solution #2, would generate lesser instructions.

Surya/Michael, request you to kindly validate if this is the expected behavior
in LE systems.

If my understanding is correct, then we would need to update
1. codegen for vec_genpcvm
2. the testcase xxgenpc-runnable.c
3. the intrinsic guide (examples sections for this intrinsic).

Reply via email to