<div>Here's my crack at a partial fix for bug 7553. In my PS3 gcc, a vector comparison generates a call to the AltiVec vcmpeqfp instruction, and then pulls the condition code bit for the boolean result. The current Clang implementation seems to consider the result of the comparison expression as a vector of intregal fields corresponding to the source operands. Which is the correct way for the C-style comparison expression?</div>
<div> </div>
<div>The enclosed patch assumes the comparison expression is of type bool for C++ and int for C just for AltiVec.</div>
<div> </div>
<div>However, there's an assert from the code generation if I use -emit-llvm because it expects a vector type for the expression. Looking into it, it seems to use the LLVM "cmp" instruction for both vectors and atomic floating point types. Is this still the right thing for AltiVec, or does it need to be changed to use something else? Sorry, I haven't yet looked much at the code generation stuff yet, but I wanted to see if I was on the right track.</div>
<div> </div>
<div>-John<br clear="all"><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com" target="_blank">John.Thompson.JTSoftware@gmail.com</a><br><br></div>