-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaconfirmedVerified by a second partyVerified by a second partyfloating-pointFloating-point mathFloating-point mathllvm:transforms
Description
Bugzilla Link | 52259 |
Version | trunk |
OS | All |
Reporter | LLVM Bugzilla Contributor |
CC | @andykaylor,@davidbolvansky,@jyknight,@RKSimon,@rotateright |
Extended Description
Consider the following code compiled with -Ofast
.
double floatingAbs(double x) {
if (x < 0)
return -x;
else
return x;
}
This should produce a fabs
but the compiler is unable to do produce one because the select instruction in the IR does not have any fast flags.
From my analysis:
SROA -> creates a Phi node without any fast flags.
SimplifyCFG -> converts the Phi to a select and copies the Phi's fast flags,
unfortunately the phi does not have any fast flags to begin with.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaconfirmedVerified by a second partyVerified by a second partyfloating-pointFloating-point mathFloating-point mathllvm:transforms