How to prevent optimizer from reordering stuff?

David Nadlinger via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Sat Mar 14 12:21:56 PDT 2015


On Saturday, 14 March 2015 at 18:42:45 UTC, Dan Olson wrote:
> While tracking down std.math problems for ARM, I find that 
> optimizer
> will reorder instructions to get FPSCR flags before the divide
> operation.

IIRC FP flag/mode support is a tricky topic in LLVM in general, 
but this specific problem seems weird. What are the attributes 
for __D3std4math9ieeeFlagsFNdZS3std4math9IeeeFlags in the IR? The 
optimizer should never move code across arbitrary function calls…

David


More information about the digitalmars-d-ldc mailing list