[Bug target/115995] RISC-V: Can't generate portable RVV code for rv64gcv_zvl512b
sh.chiang04 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jul 23 08:10:23 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115995
--- Comment #1 from Monk Chiang <sh.chiang04 at gmail dot com> ---
Another test, the compile option is "g++ -march=rv64gcv_zvl128b -mabi=lp64d
-O3"
#include <numeric>
#include <vector>
#include <iterator>
using namespace std;
int main ()
{
std::vector<int> data = {2, 2, 2, 2, 2, 2};
std::vector<int> result (6, int(-1));
std::vector<int>::iterator start = data.begin();
std::vector<int>::iterator end = data.end();
std::vector<int>::iterator result_start = result.begin();
std::adjacent_difference(start, end, result_start);
if (result[4] == 0)
exit (0);
else
abort ();
}
After do adjacent_difference the result[] value should be [2, 0, 0, 0, 0, 0]
More information about the Gcc-bugs
mailing list