From b6d8c37e1aff57e40c3dbe8fb7d827fbc957d26b Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 20 Jun 2016 18:33:56 +0000 Subject: AMDGPU: Fold more custom nodes to undef This will help sneak undefs past GVN into the DAG for some tests. Also add missing intrinsic for rsq_legacy, even though the node was already selected to the instruction. Also start passing the debug location to intrinsic errors. llvm-svn: 273181 --- llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ldexp.ll | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ldexp.ll') diff --git a/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ldexp.ll b/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ldexp.ll index c48d52d150b..511418f8d1e 100644 --- a/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ldexp.ll +++ b/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ldexp.ll @@ -1,4 +1,4 @@ -; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s +; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s ; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s declare float @llvm.amdgcn.ldexp.f32(float, i32) nounwind readnone @@ -42,3 +42,11 @@ define void @test_legacy_ldexp_f64(double addrspace(1)* %out, double %a, i32 %b) store double %result, double addrspace(1)* %out, align 8 ret void } + +; SI-LABEL: {{^}}test_ldexp_undef_f32: +; SI-NOT: v_ldexp_f32 +define void @test_ldexp_undef_f32(float addrspace(1)* %out, i32 %b) nounwind { + %result = call float @llvm.amdgcn.ldexp.f32(float undef, i32 %b) nounwind readnone + store float %result, float addrspace(1)* %out, align 4 + ret void +} -- cgit v1.2.3