PR17300.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191120
91177308-0d34-0410-b5e6-
96231b3b80d8
* as a zero extended value, so it is unsigned.
*/
#define _mm_extract_epi8(X, N) (__extension__ ({ __v16qi __a = (__v16qi)(X); \
- (unsigned char)__a[(N)];}))
+ (int)(unsigned char) \
+ __a[(N)];}))
#define _mm_extract_epi32(X, N) (__extension__ ({ __v4si __a = (__v4si)(X); \
- (unsigned)__a[(N)];}))
+ __a[(N)];}))
#ifdef __x86_64__
#define _mm_extract_epi64(X, N) (__extension__ ({ __v2di __a = (__v2di)(X); \
__a[(N)];}))
// CHECK: @test_epi16
// CHECK: extractelement <8 x i16> {{.*}}, i32 3
// CHECK: zext i16 {{.*}} to i32
+
+void extractinttypes() {
+ extern int check_extract_result_int;
+ extern __typeof(_mm_extract_epi8(_mm_setzero_si128(), 3)) check_result_int;
+ extern __typeof(_mm_extract_epi16(_mm_setzero_si128(), 3)) check_result_int;
+ extern __typeof(_mm_extract_epi32(_mm_setzero_si128(), 3)) check_result_int;
+}