r210459 - Fix line numbers for code inlined from __nodebug__ functions.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Mon Jun 9 02:09:19 PDT 2014
Author: eugenis
Date: Mon Jun 9 04:09:19 2014
New Revision: 210459
URL: http://llvm.org/viewvc/llvm-project?rev=210459&view=rev
Log:
Fix line numbers for code inlined from __nodebug__ functions.
Instructions from __nodebug__ functions don't have file:line
information even when inlined into no-nodebug functions. As a result,
intrinsics (SSE and other) from <*intrin.h> clang headers _never_
have file:line information.
With this change, an instruction without !dbg metadata gets one from
the call instruction when inlined.
Fixes PR19001.
Added:
cfe/trunk/test/CodeGen/sse-builtins-dbg.c (with props)
Modified:
cfe/trunk/test/CodeGen/sse-builtins.c
Added: cfe/trunk/test/CodeGen/sse-builtins-dbg.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/sse-builtins-dbg.c?rev=210459&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/sse-builtins-dbg.c (added)
+++ cfe/trunk/test/CodeGen/sse-builtins-dbg.c Mon Jun 9 04:09:19 2014
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -ffreestanding -triple x86_64-apple-macosx10.8.0 -target-feature +sse4.1 -g -emit-llvm %s -o - | FileCheck %s
+
+// Test that intrinsic calls inlined from _mm_* wrappers have debug metadata.
+
+#include <xmmintrin.h>
+
+__m128 test_rsqrt_ss(__m128 x) {
+ // CHECK: define {{.*}} @test_rsqrt_ss
+ // CHECK: call <4 x float> @llvm.x86.sse.rsqrt.ss({{.*}}, !dbg !{{.*}}
+ // CHECK: ret <4 x float>
+ return _mm_rsqrt_ss(x);
+}
Propchange: cfe/trunk/test/CodeGen/sse-builtins-dbg.c
------------------------------------------------------------------------------
svn:eol-style = LF
Modified: cfe/trunk/test/CodeGen/sse-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/sse-builtins.c?rev=210459&r1=210458&r2=210459&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/sse-builtins.c (original)
+++ cfe/trunk/test/CodeGen/sse-builtins.c Mon Jun 9 04:09:19 2014
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -ffreestanding -triple x86_64-apple-macosx10.8.0 -target-feature +sse4.1 -g -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -ffreestanding -triple x86_64-apple-macosx10.8.0 -target-feature +sse4.1 -emit-llvm %s -o - | FileCheck %s
#include <xmmintrin.h>
#include <emmintrin.h>
@@ -64,7 +64,7 @@ __m128 test_load1_ps(void* y) {
void test_store_ss(__m128 x, void* y) {
// CHECK-LABEL: define void @test_store_ss
- // CHECK: store {{.*}} float* {{.*}}, align 1,
+ // CHECK: store {{.*}} float* {{.*}}, align 1{{$}}
_mm_store_ss(y, x);
}
More information about the cfe-commits
mailing list