-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lower OpFNegate directly to fneg (#2739)
Update SPIRVReader to lower OpFNegate directly to fneg. By doing this the code in SpirvLowerMath can be updated to remove the change to add a canonicalize for any fneg. The motivation for this is that InstCombine can introduce fneg instructions (after some recent upstream llvm changes) and in this case we don't want to blindly add a canonicalize as this invalidates e.g. xor 0x8000000 val -> fneg val. It makes more sense to handle the requirement to treat OpFNegate as a floating point instruction at the point it is lowered (llvm fneg is not, hence the reason we may need the canonicalize intrinsic).
- Loading branch information
Showing
4 changed files
with
6 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters