forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
device-libs: Optimize odd/even integer checks in pow*
There are apparently some missing optimizations surrounding comparisons to the previous pseudo-enum. The compare of the conditional add of boolean compared to the constant 1 did not fold out. We would need to implement an optimization such as icmp eq (add (zext i1 x), (zext i1 y)), 1 => xor x, y which I filed here: llvm#64859 Just do this manually since it's more legible anyway. Saves 5 instructions for the f32 case. Change-Id: Iee7befb093561cf66b72a9df6b37d0cacb2154ee
- Loading branch information
Showing
3 changed files
with
46 additions
and
52 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