search for: example_not_optim

Displaying 3 results from an estimated 3 matches for "example_not_optim".

2014 Dec 04
2
[LLVMdev] Optimising bit-flipping code
...run that could detect this optimisation opportunity? Thanks for any ideas, /Lars /***************************************************/ /* The two LSB of x0 are 'tag bits' */ /* that we want to manipulate. */ extern long x0; void go_error(void) __attribute__ ((noreturn)); void example_not_optimized(void) { if((x0 & 3) == 2) { // Here the tag bits are removed and added // with bitwise 'and' and 'or'. x0 = ((x0 & ~3) | 2) + 12; } else { go_error(); } } /* define void @example_not_optimized() #0 { %1 = load i64* @x0, align 8, !tbaa !1 %2 = a...
2015 Jan 15
2
[LLVMdev] generate llvm.assume calls in GVN?
...Thanks for any ideas, > /Lars > > /***************************************************/ > > /* The two LSB of x0 are 'tag bits' */ > /* that we want to manipulate. */ > extern long x0; > > void go_error(void) __attribute__ ((noreturn)); > > void example_not_optimized(void) > { > if((x0 & 3) == 2) { > // Here the tag bits are removed and added > // with bitwise 'and' and 'or'. > x0 = ((x0 & ~3) | 2) + 12; > } else { > go_error(); > } > } > > /* > define void @example_not_optim...
2015 Jan 15
2
[LLVMdev] generate llvm.assume calls in GVN?
...********************************/ >>> >>> /* The two LSB of x0 are 'tag bits' */ >>> /* that we want to manipulate. */ >>> extern long x0; >>> >>> void go_error(void) __attribute__ ((noreturn)); >>> >>> void example_not_optimized(void) >>> { >>> if((x0 & 3) == 2) { >>> // Here the tag bits are removed and added >>> // with bitwise 'and' and 'or'. >>> x0 = ((x0 & ~3) | 2) + 12; >>> } else { >>> go_error(); >>&...