Skip to content
  • Evan Cheng's avatar
    Many of the SSE patterns should not be selected when AVX is available. This... · 4d1a2d44
    Evan Cheng authored
    Many of the SSE patterns should not be selected when AVX is available. This led to the following code in X86Subtarget.cpp
    
      if (HasAVX)
        X86SSELevel = NoMMXSSE;
    
    This is so patterns that are predicated on hasSSE3, etc. would not be selected when avx is available. Instead, the AVX variant is selected.
    However, this breaks instructions which do not have AVX variants.
    
    The right way to fix this is for the SSE but not-AVX patterns to predicate on something like hasSSE3() && !hasAVX().
    Then we can take out the hack in X86Subtarget.cpp. Patterns which do not have AVX variants do not need to change.
    
    However, we need to audit all the patterns before we make the change. This patch is workaround that fixes one specific case,
    the prefetch instructions. rdar://10538297
    
    llvm-svn: 146163
    4d1a2d44
Loading