comparison lib/Target/NVPTX/NVPTXInstrInfo.td @ 95:afa8332a0e37 LLVM3.8

LLVM 3.8
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 13 Oct 2015 17:48:58 +0900
parents 60c9769439b8
children 1172e4bd9c6f
comparison
equal deleted inserted replaced
84:f3e34b893a5f 95:afa8332a0e37
450 }]>; 450 }]>;
451 451
452 def SHL2MUL32 : SDNodeXForm<imm, [{ 452 def SHL2MUL32 : SDNodeXForm<imm, [{
453 const APInt &v = N->getAPIntValue(); 453 const APInt &v = N->getAPIntValue();
454 APInt temp(32, 1); 454 APInt temp(32, 1);
455 return CurDAG->getTargetConstant(temp.shl(v), MVT::i32); 455 return CurDAG->getTargetConstant(temp.shl(v), SDLoc(N), MVT::i32);
456 }]>; 456 }]>;
457 457
458 def SHL2MUL16 : SDNodeXForm<imm, [{ 458 def SHL2MUL16 : SDNodeXForm<imm, [{
459 const APInt &v = N->getAPIntValue(); 459 const APInt &v = N->getAPIntValue();
460 APInt temp(16, 1); 460 APInt temp(16, 1);
461 return CurDAG->getTargetConstant(temp.shl(v), MVT::i16); 461 return CurDAG->getTargetConstant(temp.shl(v), SDLoc(N), MVT::i16);
462 }]>; 462 }]>;
463 463
464 def MULWIDES64 464 def MULWIDES64
465 : NVPTXInst<(outs Int64Regs:$dst), (ins Int32Regs:$a, Int32Regs:$b), 465 : NVPTXInst<(outs Int64Regs:$dst), (ins Int32Regs:$a, Int32Regs:$b),
466 "mul.wide.s32 \t$dst, $a, $b;", []>; 466 "mul.wide.s32 \t$dst, $a, $b;", []>;
1136 !strconcat("add.u32 \t$dst, %lhs, %rhs;\n\t", 1136 !strconcat("add.u32 \t$dst, %lhs, %rhs;\n\t",
1137 !strconcat("}}", ""))))))), 1137 !strconcat("}}", ""))))))),
1138 []>; 1138 []>;
1139 1139
1140 def SUB_FRM_32 : SDNodeXForm<imm, [{ 1140 def SUB_FRM_32 : SDNodeXForm<imm, [{
1141 return CurDAG->getTargetConstant(32-N->getZExtValue(), MVT::i32); 1141 return CurDAG->getTargetConstant(32-N->getZExtValue(), SDLoc(N), MVT::i32);
1142 }]>; 1142 }]>;
1143 1143
1144 def : Pat<(rotl Int32Regs:$src, (i32 imm:$amt)), 1144 def : Pat<(rotl Int32Regs:$src, (i32 imm:$amt)),
1145 (ROT32imm_sw Int32Regs:$src, imm:$amt, (SUB_FRM_32 node:$amt))>, 1145 (ROT32imm_sw Int32Regs:$src, imm:$amt, (SUB_FRM_32 node:$amt))>,
1146 Requires<[noHWROT32]>; 1146 Requires<[noHWROT32]>;
1187 !strconcat("add.u64 \t$dst, %lhs, %rhs;\n\t", 1187 !strconcat("add.u64 \t$dst, %lhs, %rhs;\n\t",
1188 !strconcat("}}", ""))))))), 1188 !strconcat("}}", ""))))))),
1189 []>; 1189 []>;
1190 1190
1191 def SUB_FRM_64 : SDNodeXForm<imm, [{ 1191 def SUB_FRM_64 : SDNodeXForm<imm, [{
1192 return CurDAG->getTargetConstant(64-N->getZExtValue(), MVT::i32); 1192 return CurDAG->getTargetConstant(64-N->getZExtValue(), SDLoc(N), MVT::i32);
1193 }]>; 1193 }]>;
1194 1194
1195 def : Pat<(rotl Int64Regs:$src, (i32 imm:$amt)), 1195 def : Pat<(rotl Int64Regs:$src, (i32 imm:$amt)),
1196 (ROT64imm_sw Int64Regs:$src, imm:$amt, (SUB_FRM_64 node:$amt))>; 1196 (ROT64imm_sw Int64Regs:$src, imm:$amt, (SUB_FRM_64 node:$amt))>;
1197 def : Pat<(rotr Int64Regs:$src, (i32 imm:$amt)), 1197 def : Pat<(rotr Int64Regs:$src, (i32 imm:$amt)),