Created
June 6, 2012 22:13
-
-
Save nikomatsakis/2885156 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
# BAD CASE | |
Unoptimized: | |
``` | |
%15 = bitcast %"enum parse::token::token[#0]"* %3 to { i64, i8 }* | |
%16 = getelementptr inbounds { i64, i8 }* %15, i32 0, i32 0 | |
%17 = load i64* %16 | |
switch i64 %17, label %match_else28672 [ | |
i64 35, label %match_case28673 | |
] | |
``` | |
Optimized: | |
``` | |
%10 = bitcast i8* addrspace(1)* %9 to i192 addrspace(1)* | |
%srcval = load i192 addrspace(1)* %10, align 1 | |
%11 = and i192 %srcval, 340282366920938463481821351505477763071 | |
%12 = icmp eq i192 %11, 35 | |
br i1 %12, label %call28676, label %case_body28671 | |
``` | |
What confuses me: | |
340282366920938463481821351505477763071 is | |
'10000000000000000ffffffffffffffff' | |
in hex, which seems to have an extra bit, near as I can tell. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what I would expect: