After https://reviews.llvm.org/D83273 / https://github.com/llvm/llvm-project/commit/16f3d698f2af ("[X86] Move the feature dependency handling in X86TargetInfo::setFeatureEnabledImpl to a table based lookup in X86TargetParser.cpp"), compiling with -march=amdfam10 incorrectly starts using SSSE3 instructions, in particular pshufb. Test case: #include <xmmintrin.h> __m128i foo(unsigned char c) { return _mm_set1_epi8(c); } Asm output before: foo: # @foo .cfi_startproc # %bb.0: # %entry movd %edi, %xmm0 punpcklbw %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7] pshuflw $224, %xmm0, %xmm0 # xmm0 = xmm0[0,0,2,3,4,5,6,7] pshufd $0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] retq After: foo: # @foo .cfi_startproc # %bb.0: # %entry movd %edi, %xmm0 pxor %xmm1, %xmm1 pshufb %xmm1, %xmm0 retq Apparently https://github.com/llvm/llvm-project/commit/16f3d698f2afbbea43e0c3df81df6f2a640ce806#diff-045a11495d5fad4e01af59c60f6a387aR500 makes SSE4_A now imply SSSE3, which is not correct (at least not always, I think).
Craig, can you take a look?
Perhaps it was just a typo -- SSE3 vs SSSE3?
Fixed by e6bb4c8e7b3e27f214c9665763a2dd09aa96a5ac
(In reply to Craig Topper from comment #3) > Fixed by e6bb4c8e7b3e27f214c9665763a2dd09aa96a5ac Thanks! Pushed to 11.x as 6f1dbbc17c03206040eeaaee71e5db961f2cac30.