Select SRLI+SLLI for and i64 %x, imm if the imm is a leading ones mask.
It's useful in RV64 when the mask exceeds simm32 (cannot be generated by LUI).
Details
Details
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Event Timeline
Comment Actions
- Only do this selection for and i64 %x, imm when the imm exceeds simm32 (cannot be generated by LUI)
- Add some test cases
llvm/test/CodeGen/RISCV/copysign-casts.ll | ||
---|---|---|
32 | if a leading ones mask can be generated by LUI, it's really unnecessary to do this. I have excluded this case. |
Should we use srliw and slliw here?