summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-06-27 00:47:53 +0000
committerVedant Kumar <vsk@apple.com>2018-06-27 00:47:53 +0000
commitf6c0b41fb7199c445e8168ec094e623da7a069e0 (patch)
treef33c431501ea705d1d6294c0f89797c6e4b7c82a /llvm/test
parentd13536e9f3e196b0fe133387d14c94a4ac0a51db (diff)
downloadbcm5719-llvm-f6c0b41fb7199c445e8168ec094e623da7a069e0.tar.gz
bcm5719-llvm-f6c0b41fb7199c445e8168ec094e623da7a069e0.zip
[InstCombine] Avoid creating mis-sized dbg.values in commonCastTransforms()
This prevents InstCombine from creating mis-sized dbg.values when replacing a sequence of casts with a simpler cast. For example, in: (fptrunc (floor (fpext X))) -> (floorf X) We no longer emit dbg.value(X) (with a 32-bit float operand) to describe (fpext X) (which is a 64-bit float). This was diagnosed by the debugify check added in r335682. llvm-svn: 335696
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/InstCombine/double-float-shrink-2.ll3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/double-float-shrink-2.ll b/llvm/test/Transforms/InstCombine/double-float-shrink-2.ll
index 1364b6eeeac..5bdeaf7d9d7 100644
--- a/llvm/test/Transforms/InstCombine/double-float-shrink-2.ll
+++ b/llvm/test/Transforms/InstCombine/double-float-shrink-2.ll
@@ -5,6 +5,7 @@
; RUN: opt < %s -instcombine -S -mtriple "i386-pc-mingw32" | FileCheck -check-prefix=ALL -check-prefix=DO-SIMPLIFY %s
; RUN: opt < %s -instcombine -S -mtriple "x86_64-pc-mingw32" | FileCheck -check-prefix=ALL -check-prefix=DO-SIMPLIFY %s
; RUN: opt < %s -instcombine -S -mtriple "sparc-sun-solaris" | FileCheck -check-prefix=ALL -check-prefix=DO-SIMPLIFY %s
+; RUN: opt < %s -enable-debugify -instcombine -S -mtriple "x86_64-pc-win32" 2>&1 | FileCheck -check-prefix=DBG-VALID %s
declare double @floor(double)
declare double @ceil(double)
@@ -685,3 +686,5 @@ define float @test_no_shrink_intrin_fabs_multi_use_fpext(half %C) {
%F = fptrunc double %E to float
ret float %F
}
+
+; DBG-VALID: CheckModuleDebugify: PASS
OpenPOWER on IntegriCloud