25 lines · c
1// REQUIRES: x86-registered-target2// RUN: %clang_cc1 -fms-extensions %s -triple=i686-unknown-unknown -emit-llvm -o - | FileCheck %s --check-prefix=X863// RUN: %clang_cc1 -fms-extensions %s -triple=x86_64-unknown-unknown -emit-llvm -o - | FileCheck %s --check-prefix=X644 5typedef int v4si __attribute__ ((vector_size (16)));6v4si rep(void) {7// X86-LABEL: define{{.*}} <4 x i32> @rep8// X86: %[[ALLOCA0:.*]] = alloca <4 x i32>, align 169// X86: %[[ALLOCA1:.*]] = alloca <4 x i32>, align 1610// X86: %[[ASM:.*]] = call i64 asm sideeffect inteldialect "", "=A,~{dirflag},~{fpsr},~{flags}"()11// X86: %[[ZEXT:.*]] = zext i64 %[[ASM]] to i12812// X86: store i128 %[[ZEXT]], ptr %[[ALLOCA0]], align 1613// X86: %[[LOAD:.*]] = load <4 x i32>, ptr %[[ALLOCA1]], align 1614// X86: ret <4 x i32> %[[LOAD]]15//16// X64-LABEL: define{{.*}} <4 x i32> @rep17// X64: %[[ALLOCA:.*]] = alloca <4 x i32>, align 1618// X64: call void asm sideeffect inteldialect "", "~{dirflag},~{fpsr},~{flags}"()19// X64: %[[LOAD:.*]] = load <4 x i32>, ptr %[[ALLOCA]], align 1620// X64: ret <4 x i32> %[[LOAD]]21 v4si res;22 __asm {}23 return res;24}25