[LLVMdev] Bug in InstCombiner::FoldAndOfFCmps

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu May 2 14:20:47 PDT 2013


On 11 April 2013 16:26, Cameron McInally <cameron.mcinally at nyu.edu> wrote:
> Hey guys,
>
> I've come across a bug when combining an AND of FCMPs. This bug occurs in my
> compiler as well as Clang built from trunk.
>
> A reduced test case is:
>
> int foo( float a, double b ) {
>   return (a == a) & (b == b);
> }
>
> and the error is:
>
> Assertion failed: (getOperand(0)->getType() == getOperand(1)->getType() &&
> "Both operands to FCmp instruction are not of the same type!"), function
> FCmpInst, file [snip]/clang/llvm/include/llvm/IR/Instructions.h, line 1117.
>

I don't get any errors compiling this. Do you know if it was fixed? Do
you get an error only for some particular target? What is the 'clang
-cc1' command line that you seed in the error?

Cheers,
Rafael



More information about the llvm-dev mailing list