Issue |
133262
|
Summary |
[LLVM] Suboptimal code for rounding shift right by constant
|
Labels |
new issue
|
Assignees |
|
Reporter |
johnplatts
|
LLVM generates extra code for `((x & round_incr) + ((x ^ round_incr) >> 1)) >> 4` than for `(int32_t)(((int64_t)x + (int64_t)round_incr) >> 5)` where `x` is an int32_t value and `round_incr` is equivalent to `15 + (int32_t)((x & 32) != 0)` according to a snippet over at https://alive2.llvm.org/ce/z/Ar8vv9.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs