https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96429
Bug ID: 96429 Summary: d: Pointer subtraction uses TRUNC_DIV_EXPR Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: d Assignee: ibuclaw at gdcproject dot org Reporter: ibuclaw at gdcproject dot org Target Milestone: --- Given the pointer operation: long delta = smaller & (read - first); This gets lowered as (-fdump-tree-original) long delta = (long) smaller & (read - first) / 8; Instead of... long delta = (long) smaller & (read - first) /[ex] 8; Switching will likely give some marginal gains on performance.