These mixed bitcast patterns show up with SSE/AVX intrinsics because we bitcast function parameters to <2 x i64>.
The bitcasts obfuscate the expected min/max forms as shown in PR28001:
https://llvm.org/bugs/show_bug.cgi?id=28001#c6
| Paths 
 |  Differential  D25943  
[InstCombine] re-use bitcasted compare operands in selects (PR28001) ClosedPublic Authored by spatel on Oct 25 2016, 7:58 AM. 
Details Summary These mixed bitcast patterns show up with SSE/AVX intrinsics because we bitcast function parameters to <2 x i64>. The bitcasts obfuscate the expected min/max forms as shown in PR28001: 
Diff Detail 
 Event TimelineThis revision is now accepted and ready to land.Oct 28 2016, 4:28 PM Closed by commit rL285495: [InstCombine] re-use bitcasted compare operands in selects (PR28001) (authored by spatel).  ·  Explain WhyOct 29 2016, 8:31 AM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
Diff 76304 llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp
 llvm/trunk/test/Transforms/InstCombine/minmax-fold.ll
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||