summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2018-06-11 18:45:52 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2018-06-11 18:45:52 +0000
commitdd9415d5509c288bd390b1cd88449ad6208bdbce (patch)
treec1af34ad0a4ae90992c4f13a696c1c48ee4b99d3 /llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
parentcc63761720adf2dafc345c74e897a0231d4eb942 (diff)
downloadbcm5719-llvm-dd9415d5509c288bd390b1cd88449ad6208bdbce.tar.gz
bcm5719-llvm-dd9415d5509c288bd390b1cd88449ad6208bdbce.zip
[Hexagon] Late predicate producers cannot be used as dot-new sources
llvm-svn: 334426
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
index 66e38cfc8b9..dad314f758e 100644
--- a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
@@ -3048,10 +3048,29 @@ bool HexagonInstrInfo::predCanBeUsedAsDotNew(const MachineInstr &MI,
return false;
}
- // Hexagon Programmer's Reference says that decbin, memw_locked, and
- // memd_locked cannot be used as .new as well,
- // but we don't seem to have these instructions defined.
- return MI.getOpcode() != Hexagon::A4_tlbmatch;
+ // Instruction that produce late predicate cannot be used as sources of
+ // dot-new.
+ switch (MI.getOpcode()) {
+ case Hexagon::A4_addp_c:
+ case Hexagon::A4_subp_c:
+ case Hexagon::A4_tlbmatch:
+ case Hexagon::A5_ACS:
+ case Hexagon::F2_sfinvsqrta:
+ case Hexagon::F2_sfrecipa:
+ case Hexagon::J2_endloop0:
+ case Hexagon::J2_endloop01:
+ case Hexagon::J2_ploop1si:
+ case Hexagon::J2_ploop1sr:
+ case Hexagon::J2_ploop2si:
+ case Hexagon::J2_ploop2sr:
+ case Hexagon::J2_ploop3si:
+ case Hexagon::J2_ploop3sr:
+ case Hexagon::S2_cabacdecbin:
+ case Hexagon::S2_storew_locked:
+ case Hexagon::S4_stored_locked:
+ return false;
+ }
+ return true;
}
bool HexagonInstrInfo::PredOpcodeHasJMP_c(unsigned Opcode) const {
OpenPOWER on IntegriCloud