Jianjian Guan
Jianjian Guan
I think this revision https://reviews.llvm.org/D131551 could perform that transformation.
Fixed in https://github.com/llvm/llvm-project/commit/d67603a654880879cb42340e52195e52ad694b35.
https://reviews.llvm.org/D134850 I create a revision for this, it should work, but I do not have M1 environment to test it.
I create a revision https://reviews.llvm.org/D139815 to fix it, please review.
I added the test case.
Fixed in https://github.com/llvm/llvm-project/commit/0017dc2d0ff89bd9fb93fd25ba787ba66a4de356.
https://reviews.llvm.org/D141038 should fix this issue.
The cost of cast and fp arithmetic instruction was modified in https://github.com/llvm/llvm-project/commit/ecd7a0132a344af1451d262e226fad3eeb233b84 and https://github.com/llvm/llvm-project/commit/db07d79ab06f8f88a8bc161654336e235d906ad7, I think the cost is right at the main branch.
I create a pr https://github.com/llvm/llvm-project/pull/96046 to fix it.
Should exclude the minimum value when signed. I will create a PR to improve the selection.