Created
January 20, 2017 19:56
-
-
Save jacobly0/c0efa4dde1b13ee3d8a6bf3836ceb731 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| define i1 @bittest(i4096* %i, i32 %n) { | |
| %1 = lshr i32 %n, 3 | |
| %2 = bitcast i4096* %i to i8* | |
| %3 = getelementptr i8, i8* %2, i32 %1 | |
| %4 = load i8, i8* %3 | |
| %5 = trunc i32 %n to i8 | |
| %6 = and i8 %5, 7 | |
| %7 = lshr i8 %4, %6 | |
| %8 = and i8 %7, 1 | |
| %9 = icmp ne i8 %7, 0 | |
| ret i1 %9 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment