search for: createfcmpoeq

Displaying 6 results from an estimated 6 matches for "createfcmpoeq".

2008 May 27
3
[LLVMdev] Float compare-for-equality and select optimization opportunity
...ovne ecx,esi cmovne esi,edi While I'm pleasantly surprised that my branch does get turned into several select operations as intended (cmov - conditional move - in x86), I'm confused why it uses the ucomiss instruction (unordered compare and set flags). I only used IRBuilder::CreateFCmpOEQ. It also appears to invert the conditional, for no clear reason. I think it could be rewritten as follows: movss xmm0,dword ptr [ecx+4] comiss xmm0,dword ptr [ecx+8] mov edx,edi cmove edx,ecx cmove ecx,esi cmove esi,edi Compared to the original...
2013 Aug 13
2
[LLVMdev] SimplifyLibCalls doesn't check TLI for LibFunc availability
...); Value *Sqrt = EmitUnaryFloatFnCall(Op1, "sqrt", B, Callee->getAttributes()); Value *FAbs = EmitUnaryFloatFnCall(Sqrt, "fabs", B, Callee->getAttributes()); Value *FCmp = B.CreateFCmpOEQ(Op1, NegInf); Value *Sel = B.CreateSelect(FCmp, Inf, FAbs); return Sel; } [...] } So, before the callOptimizer call, it actually does check TLI to see that powf is available. However, the code below (that expands pow(x, 0.5) ) emits sqrt and fabs without making any checks. This m...
2008 May 27
1
[LLVMdev] Float compare-for-equality and select optimizationopportunity
...ovne ecx,esi cmovne esi,edi While I'm pleasantly surprised that my branch does get turned into several select operations as intended (cmov - conditional move - in x86), I'm confused why it uses the ucomiss instruction (unordered compare and set flags). I only used IRBuilder::CreateFCmpOEQ. It also appears to invert the conditional, for no clear reason. I think it could be rewritten as follows: movss xmm0,dword ptr [ecx+4] comiss xmm0,dword ptr [ecx+8] mov edx,edi cmove edx,ecx cmove ecx,esi cmove esi,edi Compared to the original...
2013 Aug 13
0
[LLVMdev] SimplifyLibCalls doesn't check TLI for LibFunc availability
...qrt", B,**** > > Callee->getAttributes());**** > > Value *FAbs = EmitUnaryFloatFnCall(Sqrt, "fabs", B,**** > > Callee->getAttributes());**** > > Value *FCmp = B.CreateFCmpOEQ(Op1, NegInf);**** > > Value *Sel = B.CreateSelect(FCmp, Inf, FAbs);**** > > return Sel;**** > > }**** > > ** ** > > [...]**** > > }**** > > ** ** > > So, before the callOptimizer call, it actually does check TLI to see that > powf i...
2008 May 27
0
[LLVMdev] Float compare-for-equality and select optimizationopportunity
...ovne ecx,esi cmovne esi,edi While I'm pleasantly surprised that my branch does get turned into several select operations as intended (cmov - conditional move - in x86), I'm confused why it uses the ucomiss instruction (unordered compare and set flags). I only used IRBuilder::CreateFCmpOEQ. It also appears to invert the conditional, for no clear reason. I think it could be rewritten as follows: movss xmm0,dword ptr [ecx+4] comiss xmm0,dword ptr [ecx+8] mov edx,edi cmove edx,ecx cmove ecx,esi cmove esi,edi Compared to the original...
2008 May 27
1
[LLVMdev] Float compare-for-equality andselect optimizationopportunity
...ovne ecx,esi cmovne esi,edi While I'm pleasantly surprised that my branch does get turned into several select operations as intended (cmov - conditional move - in x86), I'm confused why it uses the ucomiss instruction (unordered compare and set flags). I only used IRBuilder::CreateFCmpOEQ. It also appears to invert the conditional, for no clear reason. I think it could be rewritten as follows: movss xmm0,dword ptr [ecx+4] comiss xmm0,dword ptr [ecx+8] mov edx,edi cmove edx,ecx cmove ecx,esi cmove esi,edi Compared to the original...