From c54731aa9d527f3a39148e4fbf6b99b89d1aef7c Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 23 Jul 2013 23:55:03 +0000 Subject: DAGCombiner: Pass the correct type to TargetLowering::isF(Abs|Neg)Free This commit also implements these functions for R600 and removes a test case that was relying on the buggy behavior. llvm-svn: 187007 --- llvm/lib/Target/R600/AMDGPUISelLowering.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'llvm/lib/Target/R600/AMDGPUISelLowering.cpp') diff --git a/llvm/lib/Target/R600/AMDGPUISelLowering.cpp b/llvm/lib/Target/R600/AMDGPUISelLowering.cpp index c90176b8f88..779d97f1776 100644 --- a/llvm/lib/Target/R600/AMDGPUISelLowering.cpp +++ b/llvm/lib/Target/R600/AMDGPUISelLowering.cpp @@ -114,6 +114,20 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(TargetMachine &TM) : } } +//===---------------------------------------------------------------------===// +// Target Properties +//===---------------------------------------------------------------------===// + +bool AMDGPUTargetLowering::isFAbsFree(EVT VT) const { + assert(VT.isFloatingPoint()); + return VT == MVT::f32; +} + +bool AMDGPUTargetLowering::isFNegFree(EVT VT) const { + assert(VT.isFloatingPoint()); + return VT == MVT::f32; +} + //===---------------------------------------------------------------------===// // TargetLowering Callbacks //===---------------------------------------------------------------------===// -- cgit v1.2.3