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
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