This handles the case in:
https://llvm.org/bugs/show_bug.cgi?id=28895
...but I suspect that we may not be getting all of the possibilities yet. Eg, we can use 'X86::FANDN' for scalar FP select combines.
Paths
| Differential D23337
[x86, AVX] allow FP vector select folding to bitwise logic ops (PR28895) ClosedPublic Authored by spatel on Aug 9 2016, 3:58 PM.
Details Summary This handles the case in: ...but I suspect that we may not be getting all of the possibilities yet. Eg, we can use 'X86::FANDN' for scalar FP select combines.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Aug 10 2016, 12:41 AM andreadb edited edge metadata. Comment ActionsHi Simon, It looks good to me too. Thanks for fixing this! Comment Actions
Good point - I lazily copied the existing tests here but only changed the select operands to FP types. I changed the tests to use varying predicates in: Let me know if you see any holes in the coverage - fun mental exercise of translating LLVM predicates to SSE predicates... :) Comment Actions
Hi Sanjay, The test coverage seems OK. Something like this: ;;;; %0 = fcmp ole <4 x float> %A, %B %1 = select <4 x i1> %0, <4 x float> %C, <4 x float> zeroinitializer ret <4 x float> %1 } That said, your patch does the right thing. So, the patch lgtm. Thanks! Closed by commit rL278270: [x86, AVX] allow FP vector select folding to bitwise logic ops (PR28895) (authored by spatel). · Explain WhyAug 10 2016, 12:08 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 67574 llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/test/CodeGen/X86/avx512-cvt.ll
llvm/trunk/test/CodeGen/X86/select-with-and-or.ll
|