
#14359: C-- pipeline/NCG fails to optimize simple repeated addition
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: (none)
Type: bug | Status: new
Priority: low | Milestone:
Component: Compiler | Version: 8.2.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Runtime
Unknown/Multiple | performance bug
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
While debugging #14346 I noticed some rather abhorrent code in a
disassembly of the `newPinnedByteArray#` primop:
{{{
Dump of assembler code for function stg_newPinnedByteArrayzh:
0x00000000004a8518 <+0>: mov 0x378(%r13),%rax
0x00000000004a851f <+7>: cmpq $0x0,0x10(%rax)
0x00000000004a8524 <+12>: je 0x4a8593