Change test tool to use a loop and load intrinsic.
The files generated by the intrinsic test tool currently repeat the lines for the call multiple times, which sometimes generates very large test files. Changing it to use a loop and a load intrinsic reduces the size of the generated files and gives some coverage for the load intrinsics. This seems to also reduce the run-time for the test tool, enough that some of the intrinsics that are currently skipped because they take too long can be added back and the Rust test files can be built with --target again.
Example generated C before:
{
uint64x1_t a = { 0x10000000000000 };
uint64x1_t b = { 0x10000000000000 };
auto __return_value = vadd_u64(a, b);
std::cout << "Result -1: uint64x1_t(" << std::fixed << std::setprecision(150) << cast<uint64_t>(__return_value) << ")" << std::endl;
}
{
uint64x1_t a = { 0x3FDFFFFFFFFFFFFF };
uint64x1_t b = { 0x3FDFFFFFFFFFFFFF };
auto __return_value = vadd_u64(a, b);
std::cout << "Result -2: uint64x1_t(" << std::fixed << std::setprecision(150) << cast<uint64_t>(__return_value) << ")" << std::endl;
}
...
// Several more similar blocks
Example generated after:
const uint64_t a_vals[] = { 0x0,0x10000000000000,0x3FDFFFFFFFFFFFFF,0x3FE0000000000000,0x3FE0000000000001,0x3FEFFFFFFFFFFFFF,0x3FF0000000000000,0x3FF0000000000001,0x3FF8000000000000,0x4024000000000000, 0x7FEFFFFFFFFFFFFF,0x7FF0000000000000,0x7FF923456789ABCD,0x7FF8000000000000,0x7FF123456789ABCD,0x7FF0000000000000,0x123456789ABCD,0xFFFFFFFFFFFFF,0x1,0x8000000000000000 };
const uint64_t b_vals[] = { 0x0,0x10000000000000,0x3FDFFFFFFFFFFFFF,0x3FE0000000000000,0x3FE0000000000001,0x3FEFFFFFFFFFFFFF,0x3FF0000000000000,0x3FF0000000000001,0x3FF8000000000000,0x4024000000000000, 0x7FEFFFFFFFFFFFFF,0x7FF0000000000000,0x7FF923456789ABCD,0x7FF8000000000000,0x7FF123456789ABCD,0x7FF0000000000000,0x123456789ABCD,0xFFFFFFFFFFFFF,0x1,0x8000000000000000 };
...
{
for (int i=0; i<20; i++) {
uint64x1_t a = vld1_u64(&a_vals[i]);
uint64x1_t b = vld1_u64(&b_vals[i]);
auto __return_value = vadd_u64(a, b);
std::cout << "Result -" << i+1 << ": uint64x1_t(" << std::fixed << std::setprecision(150) << cast<uint64_t>(__return_value) << ")" << std::endl;
}
}
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Amanieu (or someone else) soon.
Please see the contribution instructions for more information.
CI should be fixed now, can you rebase?
CI should be fixed by #1326, can you rebase?