[LLVMdev] is createCFGSimplificationPass unused?

Chris Lattner sabre at nondot.org
Thu Nov 2 21:36:40 PST 2006


On Thu, 2 Nov 2006, Andrew Lenharth wrote:
> On 11/2/06, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
>> It looks like createCFGSimplificationPass was disabled on 2006/09/04.
>> This causes some problems for architectures that use conditional moves
>> to implement select (alpha and ARM). For example, on 2006/09/03 a "if
>> (a) return 0; else return 1;" compiled to
>
> This is not because of how it handles select.  For example:
> int %bar(int %x) {
> %b = seteq int %x, 5
> br bool %b, label %t, label %f
> t:
> ret int 1
> f:
> ret int 2
> }

If you write this in C and compile it with -O2, you should get the code 
you expect.  If not, *please* file a bug.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/


More information about the llvm-dev mailing list