[llvm-commits] [llvm] r169148 - /llvm/trunk/lib/Target/Hexagon/HexagonOperands.td

Jyotsna Verma jverma at codeaurora.org
Mon Dec 3 12:14:38 PST 2012


Author: jverma
Date: Mon Dec  3 14:14:38 2012
New Revision: 169148

URL: http://llvm.org/viewvc/llvm-project?rev=169148&view=rev
Log:
Removing unnecessary 'else' statement from the predicates defined in HexagonOperards.td.

Modified:
    llvm/trunk/lib/Target/Hexagon/HexagonOperands.td

Modified: llvm/trunk/lib/Target/Hexagon/HexagonOperands.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonOperands.td?rev=169148&r1=169147&r2=169148&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonOperands.td (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonOperands.td Mon Dec  3 14:14:38 2012
@@ -497,10 +497,7 @@
 
     // Return true if extending this immediate is profitable and the value
     // can fit in a 32-bit signed field.
-    if (isConstExtProfitable(Node) && isInt<32>(v))
-      return true;
-    else
-      return false;
+    return isConstExtProfitable(Node) && isInt<32>(v);
   }
 }]>;
 
@@ -515,10 +512,7 @@
 
     // Return true if extending this immediate is profitable and the value
     // can fit in a 32-bit signed field.
-    if (isConstExtProfitable(Node) && isInt<32>(v))
-      return true;
-    else
-      return false;
+    return isConstExtProfitable(Node) && isInt<32>(v);
   }
 }]>;
 
@@ -533,10 +527,7 @@
 
     // Return true if extending this immediate is profitable and the value
     // can fit in a 32-bit unsigned field.
-    if (isConstExtProfitable(Node) && isInt<32>(v))
-      return true;
-    else
-      return false;
+    return isConstExtProfitable(Node) && isInt<32>(v);
   }
 }]>;
 
@@ -551,10 +542,7 @@
 
     // Return true if extending this immediate is profitable and the value
     // can fit in a 32-bit signed field.
-    if (isConstExtProfitable(Node) && isInt<32>(v))
-      return true;
-    else
-      return false;
+    return isConstExtProfitable(Node) && isInt<32>(v);
   }
 }]>;
 
@@ -570,10 +558,7 @@
     // Return true if extending this immediate is profitable and the value
     // can't fit in a 16-bit signed field. This is required to avoid
     // unnecessary constant extenders.
-    if (isConstExtProfitable(Node) && !isInt<16>(v))
-      return true;
-    else
-      return false;
+    return isConstExtProfitable(Node) && !isInt<16>(v);
   }
 }]>;
 
@@ -588,10 +573,7 @@
 
     // Return true if extending this immediate is profitable and the value
     // can fit in a 32-bit unsigned field.
-    if (isConstExtProfitable(Node) && isInt<32>(v))
-      return true;
-    else
-      return false;
+    return isConstExtProfitable(Node) && isInt<32>(v);
   }
 }]>;
 
@@ -607,10 +589,7 @@
     // Return true if extending this immediate is profitable and the value
     // can't fit in a 16-bit signed field. This is required to avoid
     // unnecessary constant extenders.
-    if (isConstExtProfitable(Node) && !isInt<16>(v))
-      return true;
-    else
-      return false;
+    return isConstExtProfitable(Node) && !isInt<16>(v);
   }
 }]>;
 
@@ -626,10 +605,7 @@
     // Return true if extending this immediate is profitable and the value
     // can't fit in a 10-bit signed field. This is required to avoid
     // unnecessary constant extenders.
-    if (isConstExtProfitable(Node) && !isInt<10>(v))
-      return true;
-    else
-      return false;
+    return isConstExtProfitable(Node) && !isInt<10>(v);
   }
 }]>;
 
@@ -644,10 +620,7 @@
 
     // Return true if extending this immediate is profitable and the value
     // can fit in a 32-bit signed field.
-    if (isConstExtProfitable(Node) && isInt<32>(v))
-      return true;
-    else
-      return false;
+    return isConstExtProfitable(Node) && isInt<32>(v);
   }
 }]>;
 
@@ -663,10 +636,7 @@
 
     // Return true if extending this immediate is profitable and the low 1 bit
     // is zero (2-byte aligned).
-    if (isConstExtProfitable(Node) && isInt<32>(v) && ((v % 2) == 0))
-      return true;
-    else
-      return false;
+    return isConstExtProfitable(Node) && isInt<32>(v) && ((v % 2) == 0);
   }
 }]>;
 
@@ -682,10 +652,7 @@
 
     // Return true if extending this immediate is profitable and the low 2-bits
     // are zero (4-byte aligned).
-    if (isConstExtProfitable(Node)  && isInt<32>(v) && ((v % 4) == 0))
-      return true;
-    else
-      return false;
+    return isConstExtProfitable(Node)  && isInt<32>(v) && ((v % 4) == 0);
   }
 }]>;
 
@@ -701,9 +668,6 @@
 
     // Return true if extending this immediate is profitable and the low 3-bits
     // are zero (8-byte aligned).
-    if (isConstExtProfitable(Node)  && isInt<32>(v) && ((v % 8) == 0))
-      return true;
-    else
-      return false;
+    return isConstExtProfitable(Node)  && isInt<32>(v) && ((v % 8) == 0);
   }
 }]>;





More information about the llvm-commits mailing list