r175308 - Add the 'target-cpu' and 'target-features' attributes to functions.
Bill Wendling
isanbard at gmail.com
Fri Feb 15 13:30:02 PST 2013
Author: void
Date: Fri Feb 15 15:30:01 2013
New Revision: 175308
URL: http://llvm.org/viewvc/llvm-project?rev=175308&view=rev
Log:
Add the 'target-cpu' and 'target-features' attributes to functions.
The back-end will use these values to reconfigure code generation for different
features.
Modified:
cfe/trunk/lib/CodeGen/CGCall.cpp
cfe/trunk/test/CodeGen/alias.c
cfe/trunk/test/CodeGen/attr-naked.c
cfe/trunk/test/CodeGen/attributes.c
cfe/trunk/test/CodeGen/incomplete-function-type-2.c
cfe/trunk/test/CodeGen/ms-declspecs.c
cfe/trunk/test/CodeGen/ppc64-complex-parms.c
cfe/trunk/test/CodeGen/ppc64-complex-return.c
cfe/trunk/test/CodeGen/stack-protector.c
cfe/trunk/test/CodeGen/unwind-attr.c
cfe/trunk/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp
cfe/trunk/test/CodeGenCXX/attr.cpp
cfe/trunk/test/CodeGenCXX/cxx11-exception-spec.cpp
cfe/trunk/test/CodeGenCXX/debug-info-globalinit.cpp
cfe/trunk/test/CodeGenCXX/lambda-expressions.cpp
cfe/trunk/test/CodeGenObjC/arc-no-arc-exceptions.m
cfe/trunk/test/CodeGenObjC/arc.m
cfe/trunk/test/CodeGenObjC/gnu-exceptions.m
cfe/trunk/test/CodeGenObjCXX/lambda-expressions.mm
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Fri Feb 15 15:30:01 2013
@@ -26,6 +26,7 @@
#include "llvm/IR/Attributes.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/InlineAsm.h"
+#include "llvm/MC/SubtargetFeature.h"
#include "llvm/Support/CallSite.h"
#include "llvm/Transforms/Utils/Local.h"
using namespace clang;
@@ -1015,6 +1016,18 @@ void CodeGenModule::ConstructAttributeLi
if (CodeGenOpts.NoImplicitFloat)
FuncAttrs.addAttribute(llvm::Attribute::NoImplicitFloat);
+ if (!TargetOpts.CPU.empty())
+ FuncAttrs.addAttribute("target-cpu", TargetOpts.CPU);
+
+ if (TargetOpts.Features.size()) {
+ llvm::SubtargetFeatures Features;
+ for (std::vector<std::string>::const_iterator
+ it = TargetOpts.Features.begin(),
+ ie = TargetOpts.Features.end(); it != ie; ++it)
+ Features.AddFeature(*it);
+ FuncAttrs.addAttribute("target-features", Features.getString());
+ }
+
QualType RetTy = FI.getReturnType();
unsigned Index = 1;
const ABIArgInfo &RetAI = FI.getReturnInfo();
Modified: cfe/trunk/test/CodeGen/alias.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/alias.c?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/alias.c (original)
+++ cfe/trunk/test/CodeGen/alias.c Fri Feb 15 15:30:01 2013
@@ -14,7 +14,7 @@ void f0(void) { }
extern void f1(void);
extern void f1(void) __attribute((alias("f0")));
// CHECKBASIC: @f1 = alias void ()* @f0
-// CHECKBASIC: define void @f0() nounwind {
+// CHECKBASIC: define void @f0() nounwind{{.*}} {
// Make sure that aliases cause referenced values to be emitted.
// PR3200
@@ -43,4 +43,4 @@ int outer(int a) { return inner(a); }
int outer_weak(int a) { return inner_weak_a(a); }
// CHECKCC: define arm_aapcs_vfpcc i32 @outer_weak(i32 %a) nounwind {
// CHECKCC: call arm_aapcs_vfpcc i32 @inner_weak(i32 %{{.*}})
-// CHECKCC: define internal arm_aapcs_vfpcc i32 @inner_weak(i32 %a) nounwind {
+// CHECKCC: define internal arm_aapcs_vfpcc i32 @inner_weak(i32 %a) nounwind{{.*}} {
Modified: cfe/trunk/test/CodeGen/attr-naked.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/attr-naked.c?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/attr-naked.c (original)
+++ cfe/trunk/test/CodeGen/attr-naked.c Fri Feb 15 15:30:01 2013
@@ -4,13 +4,13 @@ void t1() __attribute__((naked));
// Basic functionality check
// (Note that naked needs to imply noinline to work properly.)
-// CHECK: define void @t1() naked noinline nounwind {
+// CHECK: define void @t1() naked noinline nounwind {{.*}} {
void t1()
{
}
// Make sure this doesn't explode in the verifier.
// (It doesn't really make sense, but it isn't invalid.)
-// CHECK: define void @t2() naked noinline nounwind {
+// CHECK: define void @t2() naked noinline nounwind {{.*}} {
__attribute((naked, always_inline)) void t2() {
}
Modified: cfe/trunk/test/CodeGen/attributes.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/attributes.c?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/attributes.c (original)
+++ cfe/trunk/test/CodeGen/attributes.c Fri Feb 15 15:30:01 2013
@@ -36,39 +36,39 @@ int t17() {
return t15() + t16;
}
-// CHECK: define void @t1() noreturn nounwind {
+// CHECK: define void @t1() noreturn nounwind {{.*}} {
void t1() __attribute__((noreturn));
void t1() { while (1) {} }
-// CHECK: define void @t2() nounwind {
+// CHECK: define void @t2() nounwind {{.*}} {
void t2() __attribute__((nothrow));
void t2() {}
-// CHECK: define weak void @t3() nounwind {
+// CHECK: define weak void @t3() nounwind {{.*}} {
void t3() __attribute__((weak));
void t3() {}
-// CHECK: define hidden void @t4() nounwind {
+// CHECK: define hidden void @t4() nounwind {{.*}} {
void t4() __attribute__((visibility("hidden")));
void t4() {}
-// CHECK: define void @t7() noreturn nounwind {
+// CHECK: define void @t7() noreturn nounwind {{.*}} {
void t7() __attribute__((noreturn, nothrow));
void t7() { while (1) {} }
-// CHECK: define void @t10() nounwind section "SECT" {
+// CHECK: define void @t10() nounwind {{.*}} section "SECT" {
void t10(void) __attribute__((section("SECT")));
void t10(void) {}
-// CHECK: define void @t11() nounwind section "SECT" {
+// CHECK: define void @t11() nounwind {{.*}} section "SECT" {
void __attribute__((section("SECT"))) t11(void) {}
-// CHECK: define i32 @t19() nounwind {
+// CHECK: define i32 @t19() nounwind {{.*}} {
extern int t19(void) __attribute__((weak_import));
int t19(void) {
return 10;
}
-// CHECK:define void @t20() nounwind {
+// CHECK:define void @t20() nounwind {{.*}} {
// CHECK: call void @abort()
// CHECK-NEXT: unreachable
void t20(void) {
@@ -88,4 +88,4 @@ void t21(void) {
void __attribute__((section(".foo"))) t22(void);
void __attribute__((section(".bar"))) t22(void) {}
-// CHECK: define void @t22() nounwind section ".bar"
+// CHECK: define void @t22() nounwind {{.*}} section ".bar"
Modified: cfe/trunk/test/CodeGen/incomplete-function-type-2.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/incomplete-function-type-2.c?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/incomplete-function-type-2.c (original)
+++ cfe/trunk/test/CodeGen/incomplete-function-type-2.c Fri Feb 15 15:30:01 2013
@@ -2,7 +2,7 @@
// PR14355: don't crash
// Keep this test in its own file because CodeGenTypes has global state.
-// CHECK: define void @test10_foo({}* %p1.coerce) nounwind {
+// CHECK: define void @test10_foo({}* %p1.coerce) nounwind {{.*}} {
struct test10_B;
typedef struct test10_B test10_F3(double);
void test10_foo(test10_F3 p1);
Modified: cfe/trunk/test/CodeGen/ms-declspecs.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-declspecs.c?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ms-declspecs.c (original)
+++ cfe/trunk/test/CodeGen/ms-declspecs.c Fri Feb 15 15:30:01 2013
@@ -8,14 +8,14 @@ union { struct S s; } u;
// CHECK: @u = {{.*}}zeroinitializer, align 16
-// CHECK: define void @t3() naked noinline nounwind {
+// CHECK: define void @t3() naked noinline nounwind {{.*}} {
__declspec(naked) void t3() {}
// CHECK: define void @t22() nounwind
void __declspec(nothrow) t22();
void t22() {}
-// CHECK: define void @t2() noinline nounwind {
+// CHECK: define void @t2() noinline nounwind {{.*}} {
__declspec(noinline) void t2() {}
// CHECK: call void @f20_t()
Modified: cfe/trunk/test/CodeGen/ppc64-complex-parms.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ppc64-complex-parms.c?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ppc64-complex-parms.c (original)
+++ cfe/trunk/test/CodeGen/ppc64-complex-parms.c Fri Feb 15 15:30:01 2013
@@ -9,55 +9,55 @@ float foo_float(_Complex float x) {
return crealf(x);
}
-// CHECK: define float @foo_float(float {{[%A-Za-z0-9.]+}}, float {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define float @foo_float(float {{[%A-Za-z0-9.]+}}, float {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
double foo_double(_Complex double x) {
return creal(x);
}
-// CHECK: define double @foo_double(double {{[%A-Za-z0-9.]+}}, double {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define double @foo_double(double {{[%A-Za-z0-9.]+}}, double {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
long double foo_long_double(_Complex long double x) {
return creall(x);
}
-// CHECK: define ppc_fp128 @foo_long_double(ppc_fp128 {{[%A-Za-z0-9.]+}}, ppc_fp128 {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define ppc_fp128 @foo_long_double(ppc_fp128 {{[%A-Za-z0-9.]+}}, ppc_fp128 {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
int foo_int(_Complex int x) {
return __real__ x;
}
-// CHECK: define signext i32 @foo_int(i32 {{[%A-Za-z0-9.]+}}, i32 {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define signext i32 @foo_int(i32 {{[%A-Za-z0-9.]+}}, i32 {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
short foo_short(_Complex short x) {
return __real__ x;
}
-// CHECK: define signext i16 @foo_short(i16 {{[%A-Za-z0-9.]+}}, i16 {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define signext i16 @foo_short(i16 {{[%A-Za-z0-9.]+}}, i16 {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
signed char foo_char(_Complex signed char x) {
return __real__ x;
}
-// CHECK: define signext i8 @foo_char(i8 {{[%A-Za-z0-9.]+}}, i8 {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define signext i8 @foo_char(i8 {{[%A-Za-z0-9.]+}}, i8 {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
long foo_long(_Complex long x) {
return __real__ x;
}
-// CHECK: define i64 @foo_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define i64 @foo_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
long long foo_long_long(_Complex long long x) {
return __real__ x;
}
-// CHECK: define i64 @foo_long_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define i64 @foo_long_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
void bar_float(void) {
foo_float(2.0f - 2.5fi);
}
-// CHECK: define void @bar_float() nounwind {
+// CHECK: define void @bar_float() nounwind {{.*}} {
// CHECK: %[[VAR1:[A-Za-z0-9.]+]] = alloca { float, float }, align 4
// CHECK: %[[VAR2:[A-Za-z0-9.]+]] = getelementptr inbounds { float, float }* %[[VAR1]], i32 0, i32 0
// CHECK: %[[VAR3:[A-Za-z0-9.]+]] = getelementptr inbounds { float, float }* %[[VAR1]], i32 0, i32 1
@@ -73,7 +73,7 @@ void bar_double(void) {
foo_double(2.0 - 2.5i);
}
-// CHECK: define void @bar_double() nounwind {
+// CHECK: define void @bar_double() nounwind {{.*}} {
// CHECK: %[[VAR11:[A-Za-z0-9.]+]] = alloca { double, double }, align 8
// CHECK: %[[VAR12:[A-Za-z0-9.]+]] = getelementptr inbounds { double, double }* %[[VAR11]], i32 0, i32 0
// CHECK: %[[VAR13:[A-Za-z0-9.]+]] = getelementptr inbounds { double, double }* %[[VAR11]], i32 0, i32 1
@@ -89,7 +89,7 @@ void bar_long_double(void) {
foo_long_double(2.0L - 2.5Li);
}
-// CHECK: define void @bar_long_double() nounwind {
+// CHECK: define void @bar_long_double() nounwind {{.*}} {
// CHECK: %[[VAR21:[A-Za-z0-9.]+]] = alloca { ppc_fp128, ppc_fp128 }, align 16
// CHECK: %[[VAR22:[A-Za-z0-9.]+]] = getelementptr inbounds { ppc_fp128, ppc_fp128 }* %[[VAR21]], i32 0, i32 0
// CHECK: %[[VAR23:[A-Za-z0-9.]+]] = getelementptr inbounds { ppc_fp128, ppc_fp128 }* %[[VAR21]], i32 0, i32 1
@@ -105,7 +105,7 @@ void bar_int(void) {
foo_int(2 - 3i);
}
-// CHECK: define void @bar_int() nounwind {
+// CHECK: define void @bar_int() nounwind {{.*}} {
// CHECK: %[[VAR31:[A-Za-z0-9.]+]] = alloca { i32, i32 }, align 4
// CHECK: %[[VAR32:[A-Za-z0-9.]+]] = getelementptr inbounds { i32, i32 }* %[[VAR31]], i32 0, i32 0
// CHECK: %[[VAR33:[A-Za-z0-9.]+]] = getelementptr inbounds { i32, i32 }* %[[VAR31]], i32 0, i32 1
@@ -121,7 +121,7 @@ void bar_short(void) {
foo_short(2 - 3i);
}
-// CHECK: define void @bar_short() nounwind {
+// CHECK: define void @bar_short() nounwind {{.*}} {
// CHECK: %[[VAR41:[A-Za-z0-9.]+]] = alloca { i16, i16 }, align 2
// CHECK: %[[VAR42:[A-Za-z0-9.]+]] = getelementptr inbounds { i16, i16 }* %[[VAR41]], i32 0, i32 0
// CHECK: %[[VAR43:[A-Za-z0-9.]+]] = getelementptr inbounds { i16, i16 }* %[[VAR41]], i32 0, i32 1
@@ -137,7 +137,7 @@ void bar_char(void) {
foo_char(2 - 3i);
}
-// CHECK: define void @bar_char() nounwind {
+// CHECK: define void @bar_char() nounwind {{.*}} {
// CHECK: %[[VAR51:[A-Za-z0-9.]+]] = alloca { i8, i8 }, align 1
// CHECK: %[[VAR52:[A-Za-z0-9.]+]] = getelementptr inbounds { i8, i8 }* %[[VAR51]], i32 0, i32 0
// CHECK: %[[VAR53:[A-Za-z0-9.]+]] = getelementptr inbounds { i8, i8 }* %[[VAR51]], i32 0, i32 1
@@ -153,7 +153,7 @@ void bar_long(void) {
foo_long(2L - 3Li);
}
-// CHECK: define void @bar_long() nounwind {
+// CHECK: define void @bar_long() nounwind {{.*}} {
// CHECK: %[[VAR61:[A-Za-z0-9.]+]] = alloca { i64, i64 }, align 8
// CHECK: %[[VAR62:[A-Za-z0-9.]+]] = getelementptr inbounds { i64, i64 }* %[[VAR61]], i32 0, i32 0
// CHECK: %[[VAR63:[A-Za-z0-9.]+]] = getelementptr inbounds { i64, i64 }* %[[VAR61]], i32 0, i32 1
@@ -169,7 +169,7 @@ void bar_long_long(void) {
foo_long_long(2LL - 3LLi);
}
-// CHECK: define void @bar_long_long() nounwind {
+// CHECK: define void @bar_long_long() nounwind {{.*}} {
// CHECK: %[[VAR71:[A-Za-z0-9.]+]] = alloca { i64, i64 }, align 8
// CHECK: %[[VAR72:[A-Za-z0-9.]+]] = getelementptr inbounds { i64, i64 }* %[[VAR71]], i32 0, i32 0
// CHECK: %[[VAR73:[A-Za-z0-9.]+]] = getelementptr inbounds { i64, i64 }* %[[VAR71]], i32 0, i32 1
Modified: cfe/trunk/test/CodeGen/ppc64-complex-return.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ppc64-complex-return.c?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ppc64-complex-return.c (original)
+++ cfe/trunk/test/CodeGen/ppc64-complex-return.c Fri Feb 15 15:30:01 2013
@@ -9,55 +9,55 @@ _Complex float foo_float(_Complex float
return x;
}
-// CHECK: define { float, float } @foo_float(float {{[%A-Za-z0-9.]+}}, float {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define { float, float } @foo_float(float {{[%A-Za-z0-9.]+}}, float {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
_Complex double foo_double(_Complex double x) {
return x;
}
-// CHECK: define { double, double } @foo_double(double {{[%A-Za-z0-9.]+}}, double {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define { double, double } @foo_double(double {{[%A-Za-z0-9.]+}}, double {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
_Complex long double foo_long_double(_Complex long double x) {
return x;
}
-// CHECK: define { ppc_fp128, ppc_fp128 } @foo_long_double(ppc_fp128 {{[%A-Za-z0-9.]+}}, ppc_fp128 {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define { ppc_fp128, ppc_fp128 } @foo_long_double(ppc_fp128 {{[%A-Za-z0-9.]+}}, ppc_fp128 {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
_Complex int foo_int(_Complex int x) {
return x;
}
-// CHECK: define { i32, i32 } @foo_int(i32 {{[%A-Za-z0-9.]+}}, i32 {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define { i32, i32 } @foo_int(i32 {{[%A-Za-z0-9.]+}}, i32 {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
_Complex short foo_short(_Complex short x) {
return x;
}
-// CHECK: define { i16, i16 } @foo_short(i16 {{[%A-Za-z0-9.]+}}, i16 {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define { i16, i16 } @foo_short(i16 {{[%A-Za-z0-9.]+}}, i16 {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
_Complex signed char foo_char(_Complex signed char x) {
return x;
}
-// CHECK: define { i8, i8 } @foo_char(i8 {{[%A-Za-z0-9.]+}}, i8 {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define { i8, i8 } @foo_char(i8 {{[%A-Za-z0-9.]+}}, i8 {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
_Complex long foo_long(_Complex long x) {
return x;
}
-// CHECK: define { i64, i64 } @foo_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define { i64, i64 } @foo_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
_Complex long long foo_long_long(_Complex long long x) {
return x;
}
-// CHECK: define { i64, i64 } @foo_long_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) nounwind {
+// CHECK: define { i64, i64 } @foo_long_long(i64 {{[%A-Za-z0-9.]+}}, i64 {{[%A-Za-z0-9.]+}}) nounwind {{.*}} {
float bar_float(void) {
return crealf(foo_float(2.0f - 2.5fi));
}
-// CHECK: define float @bar_float() nounwind {
+// CHECK: define float @bar_float() nounwind {{.*}} {
// CHECK: [[VAR1:[%A-Za-z0-9.]+]] = call { float, float } @foo_float
// CHECK: extractvalue { float, float } [[VAR1]], 0
// CHECK: extractvalue { float, float } [[VAR1]], 1
@@ -66,7 +66,7 @@ double bar_double(void) {
return creal(foo_double(2.0 - 2.5i));
}
-// CHECK: define double @bar_double() nounwind {
+// CHECK: define double @bar_double() nounwind {{.*}} {
// CHECK: [[VAR2:[%A-Za-z0-9.]+]] = call { double, double } @foo_double
// CHECK: extractvalue { double, double } [[VAR2]], 0
// CHECK: extractvalue { double, double } [[VAR2]], 1
@@ -75,7 +75,7 @@ long double bar_long_double(void) {
return creall(foo_long_double(2.0L - 2.5Li));
}
-// CHECK: define ppc_fp128 @bar_long_double() nounwind {
+// CHECK: define ppc_fp128 @bar_long_double() nounwind {{.*}} {
// CHECK: [[VAR3:[%A-Za-z0-9.]+]] = call { ppc_fp128, ppc_fp128 } @foo_long_double
// CHECK: extractvalue { ppc_fp128, ppc_fp128 } [[VAR3]], 0
// CHECK: extractvalue { ppc_fp128, ppc_fp128 } [[VAR3]], 1
@@ -84,7 +84,7 @@ int bar_int(void) {
return __real__(foo_int(2 - 3i));
}
-// CHECK: define signext i32 @bar_int() nounwind {
+// CHECK: define signext i32 @bar_int() nounwind {{.*}} {
// CHECK: [[VAR4:[%A-Za-z0-9.]+]] = call { i32, i32 } @foo_int
// CHECK: extractvalue { i32, i32 } [[VAR4]], 0
// CHECK: extractvalue { i32, i32 } [[VAR4]], 1
@@ -93,7 +93,7 @@ short bar_short(void) {
return __real__(foo_short(2 - 3i));
}
-// CHECK: define signext i16 @bar_short() nounwind {
+// CHECK: define signext i16 @bar_short() nounwind {{.*}} {
// CHECK: [[VAR5:[%A-Za-z0-9.]+]] = call { i16, i16 } @foo_short
// CHECK: extractvalue { i16, i16 } [[VAR5]], 0
// CHECK: extractvalue { i16, i16 } [[VAR5]], 1
@@ -102,7 +102,7 @@ signed char bar_char(void) {
return __real__(foo_char(2 - 3i));
}
-// CHECK: define signext i8 @bar_char() nounwind {
+// CHECK: define signext i8 @bar_char() nounwind {{.*}} {
// CHECK: [[VAR6:[%A-Za-z0-9.]+]] = call { i8, i8 } @foo_char
// CHECK: extractvalue { i8, i8 } [[VAR6]], 0
// CHECK: extractvalue { i8, i8 } [[VAR6]], 1
@@ -111,7 +111,7 @@ long bar_long(void) {
return __real__(foo_long(2L - 3Li));
}
-// CHECK: define i64 @bar_long() nounwind {
+// CHECK: define i64 @bar_long() nounwind {{.*}} {
// CHECK: [[VAR7:[%A-Za-z0-9.]+]] = call { i64, i64 } @foo_long
// CHECK: extractvalue { i64, i64 } [[VAR7]], 0
// CHECK: extractvalue { i64, i64 } [[VAR7]], 1
@@ -120,7 +120,7 @@ long long bar_long_long(void) {
return __real__(foo_long_long(2LL - 3LLi));
}
-// CHECK: define i64 @bar_long_long() nounwind {
+// CHECK: define i64 @bar_long_long() nounwind {{.*}} {
// CHECK: [[VAR8:[%A-Za-z0-9.]+]] = call { i64, i64 } @foo_long_long
// CHECK: extractvalue { i64, i64 } [[VAR8]], 0
// CHECK: extractvalue { i64, i64 } [[VAR8]], 1
Modified: cfe/trunk/test/CodeGen/stack-protector.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/stack-protector.c?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/stack-protector.c (original)
+++ cfe/trunk/test/CodeGen/stack-protector.c Fri Feb 15 15:30:01 2013
@@ -1,9 +1,9 @@
// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 0 | FileCheck -check-prefix=NOSSP %s
-// NOSSP: define void @test1(i8* %msg) nounwind {
+// NOSSP: define void @test1(i8* %msg) nounwind {{.*}} {
// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 1 | FileCheck -check-prefix=WITHSSP %s
-// WITHSSP: define void @test1(i8* %msg) nounwind ssp {
+// WITHSSP: define void @test1(i8* %msg) nounwind ssp {{.*}} {
// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 2 | FileCheck -check-prefix=SSPREQ %s
-// SSPREQ: define void @test1(i8* %msg) nounwind sspreq {
+// SSPREQ: define void @test1(i8* %msg) nounwind sspreq {{.*}} {
int printf(const char * _Format, ...);
Modified: cfe/trunk/test/CodeGen/unwind-attr.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/unwind-attr.c?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/unwind-attr.c (original)
+++ cfe/trunk/test/CodeGen/unwind-attr.c Fri Feb 15 15:30:01 2013
@@ -3,22 +3,22 @@
int opaque();
-// CHECK: define [[INT:i.*]] @test0() {
-// CHECK-NOEXC: define [[INT:i.*]] @test0() nounwind {
+// CHECK: define [[INT:i.*]] @test0() "target-features"={{.*}} {
+// CHECK-NOEXC: define [[INT:i.*]] @test0() nounwind{{.*}} {
int test0(void) {
return opaque();
}
// <rdar://problem/8087431>: locally infer nounwind at -O0
-// CHECK: define [[INT:i.*]] @test1() nounwind {
-// CHECK-NOEXC: define [[INT:i.*]] @test1() nounwind {
+// CHECK: define [[INT:i.*]] @test1() nounwind{{.*}} {
+// CHECK-NOEXC: define [[INT:i.*]] @test1() nounwind{{.*}} {
int test1(void) {
return 0;
}
// <rdar://problem/8283071>: not for weak functions
-// CHECK: define weak [[INT:i.*]] @test2() {
-// CHECK-NOEXC: define weak [[INT:i.*]] @test2() nounwind {
+// CHECK: define weak [[INT:i.*]] @test2() "target-features"={{.*}} {
+// CHECK-NOEXC: define weak [[INT:i.*]] @test2() nounwind{{.*}} {
__attribute__((weak)) int test2(void) {
return 0;
}
Modified: cfe/trunk/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp Fri Feb 15 15:30:01 2013
@@ -3,7 +3,7 @@ int c(void) __attribute__((const));
int p(void) __attribute__((pure));
int t(void);
-// CHECK: define i32 @_Z1fv() {
+// CHECK: define i32 @_Z1fv() {{.*}} {
int f(void) {
// CHECK: call i32 @_Z1cv() nounwind readnone
// CHECK: call i32 @_Z1pv() nounwind readonly
Modified: cfe/trunk/test/CodeGenCXX/attr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/attr.cpp?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/attr.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/attr.cpp Fri Feb 15 15:30:01 2013
@@ -2,7 +2,7 @@
// CHECK: @test2 = alias i32 ()* @_Z5test1v
-// CHECK: define i32 @_Z3foov() nounwind align 1024
+// CHECK: define i32 @_Z3foov() nounwind {{.*}} align 1024
int foo() __attribute__((aligned(1024)));
int foo() { }
@@ -13,16 +13,16 @@ class C {
void bar4() __attribute__((aligned(1024)));
} c;
-// CHECK: define void @_ZN1C4bar1Ev(%class.C* %this) unnamed_addr nounwind align 2
+// CHECK: define void @_ZN1C4bar1Ev(%class.C* %this) unnamed_addr nounwind {{.*}} align 2
void C::bar1() { }
-// CHECK: define void @_ZN1C4bar2Ev(%class.C* %this) unnamed_addr nounwind align 2
+// CHECK: define void @_ZN1C4bar2Ev(%class.C* %this) unnamed_addr nounwind {{.*}} align 2
void C::bar2() { }
-// CHECK: define void @_ZN1C4bar3Ev(%class.C* %this) unnamed_addr nounwind align 1024
+// CHECK: define void @_ZN1C4bar3Ev(%class.C* %this) unnamed_addr nounwind {{.*}} align 1024
void C::bar3() { }
-// CHECK: define void @_ZN1C4bar4Ev(%class.C* %this) nounwind align 1024
+// CHECK: define void @_ZN1C4bar4Ev(%class.C* %this) nounwind {{.*}} align 1024
void C::bar4() { }
// PR6635
Modified: cfe/trunk/test/CodeGenCXX/cxx11-exception-spec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/cxx11-exception-spec.cpp?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/cxx11-exception-spec.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/cxx11-exception-spec.cpp Fri Feb 15 15:30:01 2013
@@ -10,9 +10,9 @@ template<typename T> struct S {
static void g() noexcept(sizeof(T) == 4);
};
-// CHECK: define {{.*}} @_Z1fIsEvv() {
+// CHECK: define {{.*}} @_Z1fIsEvv() "target-features"={{.*}} {
template<> void f<short>() { h(); }
-// CHECK: define {{.*}} @_Z1fIA2_sEvv() nounwind {
+// CHECK: define {{.*}} @_Z1fIA2_sEvv() nounwind "target-features"={{.*}} {
template<> void f<short[2]>() noexcept { h(); }
// CHECK: define {{.*}} @_ZN1SIsE1fEv()
@@ -21,9 +21,9 @@ template<> void S<short>::f() { h(); }
// CHECK: define {{.*}} @_ZN1SIA2_sE1fEv() nounwind
template<> void S<short[2]>::f() noexcept { h(); }
-// CHECK: define {{.*}} @_Z1fIDsEvv() {
+// CHECK: define {{.*}} @_Z1fIDsEvv() "target-features"={{.*}} {
template void f<char16_t>();
-// CHECK: define {{.*}} @_Z1fIA2_DsEvv() nounwind {
+// CHECK: define {{.*}} @_Z1fIA2_DsEvv() nounwind "target-features"={{.*}} {
template void f<char16_t[2]>();
// CHECK: define {{.*}} @_ZN1SIDsE1fEv()
@@ -33,9 +33,9 @@ template void S<char16_t>::f();
template void S<char16_t[2]>::f();
void h() {
- // CHECK: define {{.*}} @_Z1fIiEvv() nounwind {
+ // CHECK: define {{.*}} @_Z1fIiEvv() nounwind "target-features"={{.*}} {
f<int>();
- // CHECK: define {{.*}} @_Z1fIA2_iEvv() {
+ // CHECK: define {{.*}} @_Z1fIA2_iEvv() "target-features"={{.*}} {
f<int[2]>();
// CHECK: define {{.*}} @_ZN1SIiE1fEv() nounwind
@@ -44,9 +44,9 @@ void h() {
// CHECK-NOT: nounwind
S<int[2]>::f();
- // CHECK: define {{.*}} @_Z1fIfEvv() nounwind {
+ // CHECK: define {{.*}} @_Z1fIfEvv() nounwind "target-features"={{.*}} {
void (*f1)() = &f<float>;
- // CHECK: define {{.*}} @_Z1fIdEvv() {
+ // CHECK: define {{.*}} @_Z1fIdEvv() "target-features"={{.*}} {
void (*f2)() = &f<double>;
// CHECK: define {{.*}} @_ZN1SIfE1fEv() nounwind
@@ -55,9 +55,9 @@ void h() {
// CHECK-NOT: nounwind
void (*f4)() = &S<double>::f;
- // CHECK: define {{.*}} @_Z1fIA4_cEvv() nounwind {
+ // CHECK: define {{.*}} @_Z1fIA4_cEvv() nounwind "target-features"={{.*}} {
(void)&f<char[4]>;
- // CHECK: define {{.*}} @_Z1fIcEvv() {
+ // CHECK: define {{.*}} @_Z1fIcEvv() "target-features"={{.*}} {
(void)&f<char>;
// CHECK: define {{.*}} @_ZN1SIA4_cE1fEv() nounwind
Modified: cfe/trunk/test/CodeGenCXX/debug-info-globalinit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-globalinit.cpp?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-globalinit.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-globalinit.cpp Fri Feb 15 15:30:01 2013
@@ -17,7 +17,7 @@ int main(void) {}
// CHECK: define internal void @__cxx_global_var_init()
// CHECK-NOT: __cxx_global_var_init
-// CHECK: %[[C0:.+]] = call i32 @_Z4testv(), !dbg ![[LINE:.*]]
+// CHECK: %[[C0:.+]] = call i32 @_Z4testv() "target-features"={{.*}}, !dbg ![[LINE:.*]]
// CHECK-NOT: __cxx_global_var_init
// CHECK: store i32 %[[C0]], i32* @_ZL1i, align 4, !dbg
//
Modified: cfe/trunk/test/CodeGenCXX/lambda-expressions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/lambda-expressions.cpp?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/lambda-expressions.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/lambda-expressions.cpp Fri Feb 15 15:30:01 2013
@@ -91,7 +91,7 @@ void staticarrayref(){
}();
}
-// CHECK: define internal void @"_ZZ1hvEN3$_88__invokeEv"(%struct.A* noalias sret %agg.result)
+// CHECK: define internal void @"_ZZ1hvEN3$_88__invokeEv"(%struct.A* noalias sret %agg.result) {{.*}} {
// CHECK-NOT: =
// CHECK: call void @"_ZZ1hvENK3$_8clEv"(%struct.A* sret %agg.result,
// CHECK-NEXT: ret void
Modified: cfe/trunk/test/CodeGenObjC/arc-no-arc-exceptions.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/arc-no-arc-exceptions.m?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/arc-no-arc-exceptions.m (original)
+++ cfe/trunk/test/CodeGenObjC/arc-no-arc-exceptions.m Fri Feb 15 15:30:01 2013
@@ -9,8 +9,8 @@ void thrower(void);
void not(void) __attribute__((nothrow));
// CHECK: define void @test0(
-// CHECK: call void @thrower(), !clang.arc.no_objc_arc_exceptions !
-// CHECK: call void @not() nounwind, !clang.arc.no_objc_arc_exceptions !
+// CHECK: call void @thrower() "target-features"={{.*}}, !clang.arc.no_objc_arc_exceptions !
+// CHECK: call void @not() nounwind "target-features"={{.*}}, !clang.arc.no_objc_arc_exceptions !
// NO-METADATA: define void @test0(
// NO-METADATA-NOT: !clang.arc.no_objc_arc_exceptions
// NO-METADATA: }
@@ -20,8 +20,8 @@ void test0(void) {
}
// CHECK: define void @test1(
-// CHECK: call void @thrower(), !clang.arc.no_objc_arc_exceptions !
-// CHECK: call void @not() nounwind, !clang.arc.no_objc_arc_exceptions !
+// CHECK: call void @thrower() "target-features"={{.*}}, !clang.arc.no_objc_arc_exceptions !
+// CHECK: call void @not() nounwind "target-features"={{.*}}, !clang.arc.no_objc_arc_exceptions !
// NO-METADATA: define void @test1(
// NO-METADATA-NOT: !clang.arc.no_objc_arc_exceptions
// NO-METADATA: }
Modified: cfe/trunk/test/CodeGenObjC/arc.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/arc.m?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/arc.m (original)
+++ cfe/trunk/test/CodeGenObjC/arc.m Fri Feb 15 15:30:01 2013
@@ -676,7 +676,7 @@ void test21(unsigned n) {
@implementation Test29
static id _test29_allocator = 0;
- (id) init {
-// CHECK: define internal i8* @"\01-[Test29 init]"([[TEST29:%.*]]* {{%.*}},
+// CHECK: define internal i8* @"\01-[Test29 init]"([[TEST29:%[^*]*]]* {{%.*}},
// CHECK: [[SELF:%.*]] = alloca [[TEST29]]*, align 8
// CHECK-NEXT: [[CMD:%.*]] = alloca i8*, align 8
// CHECK-NEXT: [[CLEANUP:%.*]] = alloca i32
@@ -786,7 +786,7 @@ typedef struct Test30_helper Test30_help
char *helper;
}
- (id) init {
-// CHECK: define internal i8* @"\01-[Test30 init]"([[TEST30:%.*]]* {{%.*}},
+// CHECK: define internal i8* @"\01-[Test30 init]"([[TEST30:%[^*]*]]* {{%.*}},
// CHECK: [[RET:%.*]] = alloca [[TEST30]]*
// CHECK-NEXT: alloca i8*
// CHECK-NEXT: alloca i32
Modified: cfe/trunk/test/CodeGenObjC/gnu-exceptions.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/gnu-exceptions.m?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/gnu-exceptions.m (original)
+++ cfe/trunk/test/CodeGenObjC/gnu-exceptions.m Fri Feb 15 15:30:01 2013
@@ -6,7 +6,7 @@ void log(int i);
@class C;
-// CHECK: define void @test0() {
+// CHECK: define void @test0() "target-features"={{.*}} {
void test0() {
@try {
// CHECK: invoke void @opaque()
Modified: cfe/trunk/test/CodeGenObjCXX/lambda-expressions.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/lambda-expressions.mm?rev=175308&r1=175307&r2=175308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/lambda-expressions.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/lambda-expressions.mm Fri Feb 15 15:30:01 2013
@@ -25,13 +25,13 @@ typedef int (^fp)();
fp global;
void f2() { global = []{ return 3; }; }
-// MRC: define void @_Z2f2v() nounwind {
+// MRC: define void @_Z2f2v() nounwind "target-features"={{.*}} {
// MRC: store i8* bitcast (i32 (i8*)* @___Z2f2v_block_invoke to i8*),
// MRC-NOT: call
// MRC: ret void
// ("global" contains a dangling pointer after this function runs.)
-// ARC: define void @_Z2f2v() nounwind {
+// ARC: define void @_Z2f2v() nounwind "target-features"={{.*}} {
// ARC: store i8* bitcast (i32 (i8*)* @___Z2f2v_block_invoke to i8*),
// ARC: call i8* @objc_retainBlock
// ARC: call void @objc_release
More information about the cfe-commits
mailing list