[Hexagon] Use A2_tfrsi for constant pool and jump table addresses
[oota-llvm.git] / lib / Target / Hexagon / HexagonInstrInfo.cpp
index 9658a5a84df1ce0ee5ffc7aebd2c1e9167edd2f4..80b59cabe3de5710facf6c27ad482bcf7d89e1a0 100644 (file)
@@ -1770,7 +1770,8 @@ bool HexagonInstrInfo::isConstExtended(MachineInstr *MI) const {
   // We currently only handle isGlobal() because it is the only kind of
   // object we are going to end up with here for now.
   // In the future we probably should add isSymbol(), etc.
-  if (MO.isGlobal() || MO.isSymbol() || MO.isBlockAddress())
+  if (MO.isGlobal() || MO.isSymbol() || MO.isBlockAddress() ||
+      MO.isJTI() || MO.isCPI())
     return true;
 
   // If the extendable operand is not 'Immediate' type, the instruction should