Using the more robust log2 search allows us to fold more cases (same
logic as exists for idiv/irem).
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
| Time | Test | |
|---|---|---|
| 110 ms | x64 debian > Flang.Driver::code-gen-rv64.f90 | 
Event Timeline
| llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp | ||
|---|---|---|
| 489 | We should preserve the nuw flag here: https://alive2.llvm.org/ce/z/YkwtoD We can't preserve nsw due to the INT_MIN edge case: https://alive2.llvm.org/ce/z/HTaC3b | |
| llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp | ||
|---|---|---|
| 489 | 
 Also added test this. | |
We should preserve the nuw flag here: https://alive2.llvm.org/ce/z/YkwtoD
We can't preserve nsw due to the INT_MIN edge case: https://alive2.llvm.org/ce/z/HTaC3b