This paper proposes a code selection method for SIMD instructions with PACK instructions using integer linear programming. A conventional method often generates inefficient code because it does not consider data transfer operations such as PACK instructions. The proposed method considers data transfer and selects as PACK instructions. In the proposed method, the rules that represent PACK instructions are introduced, and nodes for data transfer are added to DAG which represents a basic block in source code. Code selection problems are translated into integer linear programming problem. Experimental results show that the proposed method reduced the code size by 10 and the execution cycles by 20 or more, comparing to the method without PACK instructions.
展开▼