-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for nowrap flags to
trunc
(#1024)
- Loading branch information
1 parent
2285557
commit 2fccad2
Showing
5 changed files
with
56 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
define i8 @src(i8 %x) { | ||
%trunc = trunc nsw i8 %x to i1 | ||
%sext = sext i1 %trunc to i8 | ||
ret i8 %sext | ||
} | ||
|
||
define i8 @tgt(i8 %x) { | ||
ret i8 %x | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
define i8 @src(i8 %x) { | ||
%trunc = trunc nuw i8 %x to i1 | ||
%zext = zext i1 %trunc to i8 | ||
ret i8 %zext | ||
} | ||
|
||
define i8 @tgt(i8 %x) { | ||
ret i8 %x | ||
} |