mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 19:45:40 -04:00

Summary: On older processors this instruction encoding is treated as a NOP. MSVC doesn't disable intrinsics based on features the way clang/gcc does. Because the PAUSE instruction encoding doesn't crash older processors, some software out there uses these intrinsics without checking for SSE2. This change also seems to also be consistent with gcc behavior. Fixes PR34079 Reviewers: RKSimon, zvi Reviewed By: RKSimon Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36362 llvm-svn: 310191
12 lines
402 B
C
12 lines
402 B
C
// RUN: %clang_cc1 -ffreestanding %s -triple=i386-pc-win32 -target-feature -sse2 -emit-llvm -o - -Wall -Werror | FileCheck %s
|
|
// RUN: %clang_cc1 -ffreestanding %s -triple=i386-pc-win32 -target-feature +sse2 -emit-llvm -o - -Wall -Werror | FileCheck %s
|
|
|
|
|
|
#include <x86intrin.h>
|
|
|
|
void test_mm_pause() {
|
|
// CHECK-LABEL: test_mm_pause
|
|
// CHECK: call void @llvm.x86.sse2.pause()
|
|
return _mm_pause();
|
|
}
|