Closed ita-sc closed 1 month ago
I'm not sure I want this. compiler should do this one. It guranteed does it on other arches. What's up here.
If you can come up with example where bit_cast didn't compile well in optimized mode- let's do a bug report but then yeah - we can put custom code somewhere. Otherwise - let's not.
If you can come up with example where bit_cast didn't compile well in optimized mode- let's do a bug report but then yeah - we can put custom code somewhere. Otherwise - let's not.
I've checked asm output with this patch, and with standard std::bit_cast
, and it seems they are almost the same (I'll try to minimize the rest case), so dropping for now changes in EVE core code. Patch now consist only in changes in bit_cast
test and turning this test in RISCV CI
Hi
This patch improves
bit_cast
support for RISC-VWide
types. Now instead of usingstd::bit_cast
, that could lead tostd::memcpy
, we use pseudo intrinsics, that will result in no real code.Also I've added some tests for
bit_cast
to check that expected combination of types will be supported.