If extension Zbt is enabled, we could use cmov to lower sdiv pow2.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Can you add test cases for dividing by power of 2 larger than 4096/-4096? Those will cause the add with pow2-1 to not fit in the an ADDI anymore. So I think that would be worse code?
I'm not sure it is worth doing this right now given that Zbt is not up for ratification and there has been a lot of discussion about how much encoding space cmov uses.
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | ||
---|---|---|
2184 | What about i128 and larger? Or is that already blocked by the caller? |
Comment Actions
What a coincidence.😁
I need to keep track of recent progress before I work on something.
What about i128 and larger? Or is that already blocked by the caller?