[LLVMdev] Floating point compare instruction selection

Morten Ofstad morten at hue.no
Wed Mar 16 05:17:38 PST 2005


I didn't get any reply to my previous mail about adding floating point intrinsics to the X86 pattern instruction 
selector... And I could really need some help. Anyway, I think my confusion was caused partly by an already existing bug 
in the instruction selection for floating point compares.

The case which emits code for the special case of comparing against constant 0.0 does not return after generating it's 
code, so the normal compare is also generated! As far as I can tell it should return right after this:

BuildMI(BB, X86::SAHF, 1);

instead it falls through and goes on to generate the normal compare instruction... Am I right?


More information about the llvm-dev mailing list