projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Hexagon: Avoid left shifting negative values (it's UB)
[oota-llvm.git]
/
lib
/
Target
/
Hexagon
/
MCTargetDesc
/
HexagonShuffler.h
diff --git
a/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.h
b/lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.h
index 9218fd3eb07056d6a476bfbffbbed6fc39c89430..949ad8cebdcd7be4f665df151b79ad74f771246f 100644
(file)
--- a/
lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.h
+++ b/
lib/Target/Hexagon/MCTargetDesc/HexagonShuffler.h
@@
-34,7
+34,7
@@
public:
HexagonResource(unsigned s) { setUnits(s); };
void setUnits(unsigned s) {
- Slots = s & ~(
-1
<< HEXAGON_PACKET_SIZE);
+ Slots = s & ~(
~0U
<< HEXAGON_PACKET_SIZE);
setWeight(s);
};
unsigned setWeight(unsigned s);