From 7ed04fa7d80b904fc7e543db9e99d45cb920f404 Mon Sep 17 00:00:00 2001 From: Dragomir Ivanov Date: Sun, 29 Apr 2012 21:25:23 +0300 Subject: [PATCH] r600g/llvm: Add pattern for llvm.AMDGPU.kill v2 Signed-off-by: Tom Stellard --- src/gallium/drivers/radeon/AMDGPUIntrinsics.td | 2 +- src/gallium/drivers/radeon/R600Instructions.td | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/AMDGPUIntrinsics.td b/src/gallium/drivers/radeon/AMDGPUIntrinsics.td index d2cda0db936..bcd61b4b429 100644 --- a/src/gallium/drivers/radeon/AMDGPUIntrinsics.td +++ b/src/gallium/drivers/radeon/AMDGPUIntrinsics.td @@ -26,7 +26,7 @@ let TargetPrefix = "AMDGPU", isTarget = 1 in { def int_AMDGPU_div : Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], []>; def int_AMDGPU_dp4 : Intrinsic<[llvm_float_ty], [llvm_v4f32_ty, llvm_v4f32_ty], []>; def int_AMDGPU_floor : Intrinsic<[llvm_float_ty], [llvm_float_ty], []>; - def int_AMDGPU_kill : Intrinsic<[llvm_float_ty], [llvm_float_ty], []>; + def int_AMDGPU_kill : Intrinsic<[], [llvm_float_ty], []>; def int_AMDGPU_kilp : Intrinsic<[], [], []>; def int_AMDGPU_lrp : Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty, llvm_float_ty], []>; def int_AMDGPU_mul : Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], []>; diff --git a/src/gallium/drivers/radeon/R600Instructions.td b/src/gallium/drivers/radeon/R600Instructions.td index 02043fdeea5..3b8513c9805 100644 --- a/src/gallium/drivers/radeon/R600Instructions.td +++ b/src/gallium/drivers/radeon/R600Instructions.td @@ -434,6 +434,11 @@ def KILP : Pat < (MASK_WRITE (KILLGT (f32 ONE), (f32 ZERO))) >; +def KIL : Pat < + (int_AMDGPU_kill R600_Reg32:$src0), + (MASK_WRITE (KILLGT (f32 ZERO), (f32 R600_Reg32:$src0))) +>; + /* Helper classes for common instructions */ class MUL_LIT_Common inst> : R600_3OP < -- 2.30.2