Skip to content

Instantly share code, notes, and snippets.

@regehr
Created October 28, 2019 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save regehr/b2b724ea337c71a2aa7e70315a18c5d1 to your computer and use it in GitHub Desktop.
Save regehr/b2b724ea337c71a2aa7e70315a18c5d1 to your computer and use it in GitHub Desktop.
----------------------------------------
define i64 @slice(i64 %0) {
%1:
%2 = shl i64 9223372036854775807, %0
ret i64 %2
}
=>
define i64 @slice(i64 %rdi) {
%0:
ret i64 -2246371524778917889
}
Transformation doesn't verify!
ERROR: Value mismatch
Example:
i64 %0 = #x0000000000000000 (0)
Source:
i64 %2 = #x7fffffffffffffff (9223372036854775807)
Target:
Source value: #x7fffffffffffffff (9223372036854775807)
Target value: #xe0d348ffffffffff (16200372548930633727, -2246371524778917889)
Summary:
0 correct transformations
1 incorrect transformations
0 errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment