[LLVM][IR] Use splat syntax when printing ConstantExpr based splats. (#116856)
[llvm-project.git] / clang / test / CodeGen / pr41027.c
blobc16e232931c01bfcf112bbeafa7eaf5a5984df4c
1 // REQUIRES: x86-registered-target
2 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -S -O2 -o - %s | FileCheck %s
4 // CHECK-LABEL: f:
5 // CHECK: movl $1, %eax
6 // CHECK-NEXT: #APP
7 // CHECK-NEXT: outl %eax, $1
8 // CHECK-NEXT: #NO_APP
10 static inline void pr41027(unsigned a, unsigned b) {
11 if (__builtin_constant_p(a)) {
12 __asm__ volatile("outl %0,%w1" : : "a"(b), "n"(a));
13 } else {
14 __asm__ volatile("outl %0,%w1" : : "a"(b), "d"(a));
18 void f(unsigned port) {
19 pr41027(1, 1);