Displaying 3 results from an estimated 3 matches for "example_optimized".
2014 Dec 04
2
[LLVMdev] Optimising bit-flipping code
...uld be optimized away
%6 = or i64 %5, 2 ; this should be optimized away
%7 = add nsw i64 %6, 12
store i64 %7, i64* @x0, align 8, !tbaa !1
ret void
; <label>:8 ; preds = %0
tail call void @go_error() #2
unreachable
}
*/
void example_optimized(void)
{
if((x0 & 3) == 2) {
// Here the tag bits are removed and added
// with subtraction and addition.
x0 = (x0 - (x0 & 3) + 2) + 12;
} else {
go_error();
}
}
/*
define void @example_optimized() #0 {
%1 = load i64* @x0, align 8, !tbaa !1
%2 = and i64 %1, 3
%3...
2015 Jan 15
2
[LLVMdev] generate llvm.assume calls in GVN?
...; this should be optimized away
> %7 = add nsw i64 %6, 12
> store i64 %7, i64* @x0, align 8, !tbaa !1
> ret void
>
> ; <label>:8 ; preds = %0
> tail call void @go_error() #2
> unreachable
> }
> */
>
>
> void example_optimized(void)
> {
> if((x0 & 3) == 2) {
> // Here the tag bits are removed and added
> // with subtraction and addition.
> x0 = (x0 - (x0 & 3) + 2) + 12;
> } else {
> go_error();
> }
> }
>
> /*
> define void @example_optimized() #0 {
>...
2015 Jan 15
2
[LLVMdev] generate llvm.assume calls in GVN?
...%7, i64* @x0, align 8, !tbaa !1
>>> ret void
>>>
>>> ; <label>:8 ; preds = %0
>>> tail call void @go_error() #2
>>> unreachable
>>> }
>>> */
>>>
>>>
>>> void example_optimized(void)
>>> {
>>> if((x0 & 3) == 2) {
>>> // Here the tag bits are removed and added
>>> // with subtraction and addition.
>>> x0 = (x0 - (x0 & 3) + 2) + 12;
>>> } else {
>>> go_error();
>>> }
>&g...