Displaying 3 results from an estimated 3 matches for "next7".
Did you mean:
next
2005 May 04
3
[LLVMdev] Simplifying boolean expressions
...e a code like this:
%tmp.aux = cast bool %tmp.24 to int
%tmp.x = xor int %tmp.aux, 1 ; negates tmp.24
%tmp.xx = cast int %tmp.x to bool
%tmp.y = or bool %tmp.xx, %tmp.24 ; will be always true
br bool %tmp.y, label %next6, label %next7
Is there an optimization in LLVM that will recognize that %tmp.y is always
true, and replace the entire basic block with unconditional jump?
I've tried running 'opt' on the attached file, but did not get the desired
effect.
The full story is that I'll be generating code like ab...
2005 May 04
0
[LLVMdev] Simplifying boolean expressions
...;
> %tmp.aux = cast bool %tmp.24 to int
> %tmp.x = xor int %tmp.aux, 1 ; negates tmp.24
> %tmp.xx = cast int %tmp.x to bool
> %tmp.y = or bool %tmp.xx, %tmp.24 ; will be always true
> br bool %tmp.y, label %next6, label %next7
>
> Is there an optimization in LLVM that will recognize that %tmp.y is always
> true, and replace the entire basic block with unconditional jump?
Actually, the -instcombine pass already does this. Please try it out and
let me know if it doesn't do what you want.
-Chris
--
http:/...
2005 May 05
2
[LLVMdev] Simplifying boolean expressions
...x = cast bool %tmp.24 to int
> > %tmp.x = xor int %tmp.aux, 1 ; negates tmp.24
> > %tmp.xx = cast int %tmp.x to bool
> > %tmp.y = or bool %tmp.xx, %tmp.24 ; will be always true
> > br bool %tmp.y, label %next6, label %next7
> >
> > Is there an optimization in LLVM that will recognize that %tmp.y is
> > always true, and replace the entire basic block with unconditional jump?
>
> Actually, the -instcombine pass already does this. Please try it out and
> let me know if it doesn't do what y...