[PATCH 2/6] R600: Expand zero undef variants of ctlz/cttz

Jan Vesely jan.vesely at rutgers.edu
Thu Jun 12 12:41:28 PDT 2014


Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---

Although this changes both SI and older hw, I have not enabled EG 64 bit tests
due to SelectionDAG.cpp:4601 assertion failure "Should only be an extending
load, not truncating!", in s_ctpop_v2i64 test.
I believe this is a separate issue.

Also fixes builtin-(u)long-clz piglit tests.

 lib/Target/R600/AMDGPUISelLowering.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/Target/R600/AMDGPUISelLowering.cpp b/lib/Target/R600/AMDGPUISelLowering.cpp
index 92ab174..a98fe86 100644
--- a/lib/Target/R600/AMDGPUISelLowering.cpp
+++ b/lib/Target/R600/AMDGPUISelLowering.cpp
@@ -249,6 +249,8 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(TargetMachine &TM) :
   for (MVT VT : VTs) {
     setOperationAction(ISD::CTTZ, VT, Expand);
     setOperationAction(ISD::CTLZ, VT, Expand);
+    setOperationAction(ISD::CTTZ_ZERO_UNDEF, VT, Expand);
+    setOperationAction(ISD::CTLZ_ZERO_UNDEF, VT, Expand);
   }
 
   static const MVT::SimpleValueType IntTypes[] = {
@@ -278,6 +280,8 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(TargetMachine &TM) :
     setOperationAction(ISD::CTPOP, VT, Expand);
     setOperationAction(ISD::CTTZ, VT, Expand);
     setOperationAction(ISD::CTLZ, VT, Expand);
+    setOperationAction(ISD::CTTZ_ZERO_UNDEF, VT, Expand);
+    setOperationAction(ISD::CTLZ_ZERO_UNDEF, VT, Expand);
   }
 
   static const MVT::SimpleValueType FloatTypes[] = {
-- 
1.9.3




More information about the llvm-commits mailing list