-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generating an invert operation for boolean xor is invalid in most con…
…texts due to integer promotion (#192)
- Loading branch information
Showing
2 changed files
with
15 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
define dso_local i1 @a() { | ||
ret i1 1 | ||
} | ||
|
||
define dso_local i32 @main() #0 { | ||
%ret = call zeroext i1 @a() | ||
%cond = xor i1 %ret, true | ||
br i1 %cond, label %a_is_false, label %a_is_true | ||
|
||
a_is_false: | ||
ret i32 -1 | ||
|
||
a_is_true: | ||
ret i32 6 | ||
} |