@@ -1741,11 +1741,14 @@ def FMOV64i : MOVi<B64, "b64", f64, f64imm, fpimm>;
17411741
17421742
17431743def to_tglobaladdr : SDNodeXForm<globaladdr, [{
1744- return CurDAG->getTargetGlobalAddress(N->getGlobal(), SDLoc(N), N->getValueType(0), N->getOffset(), N->getTargetFlags());
1744+ return CurDAG->getTargetGlobalAddress(N->getGlobal(), SDLoc(N),
1745+ N->getValueType(0), N->getOffset(),
1746+ N->getTargetFlags());
17451747}]>;
17461748
17471749def to_texternsym : SDNodeXForm<externalsym, [{
1748- return CurDAG->getTargetExternalSymbol(N->getSymbol(), N->getValueType(0), N->getTargetFlags());
1750+ return CurDAG->getTargetExternalSymbol(N->getSymbol(), N->getValueType(0),
1751+ N->getTargetFlags());
17491752}]>;
17501753
17511754def to_tframeindex : SDNodeXForm<frameindex, [{
@@ -2139,30 +2142,32 @@ foreach is_convergent = [0, 1] in {
21392142
21402143 let isCall = 1, isConvergent = is_convergent in {
21412144 def CALL # convergent_suffix :
2142- NVPTXInst<(outs), (ins ADDR_base:$addr, CallOperand:$rets, CallOperand:$params, i32imm:$proto),
2145+ NVPTXInst<(outs),
2146+ (ins ADDR_base:$addr, CallOperand:$rets, CallOperand:$params,
2147+ i32imm:$proto),
21432148 "call${rets:RetList} $addr, (${params:ParamList}), prototype_$proto;", []>;
21442149
21452150 def CALL_UNI # convergent_suffix :
2146- NVPTXInst<(outs), (ins ADDR_base:$addr, CallOperand:$rets, CallOperand:$params),
2151+ NVPTXInst<(outs),
2152+ (ins ADDR_base:$addr, CallOperand:$rets, CallOperand:$params),
21472153 "call.uni${rets:RetList} $addr, (${params:ParamList});", []>;
21482154 }
21492155
2150- defvar inst = !cast<NVPTXInst>("CALL" # convergent_suffix);
2151- defvar inst_uni = !cast<NVPTXInst>("CALL_UNI" # convergent_suffix);
2152-
2156+ defvar call_inst = !cast<NVPTXInst>("CALL" # convergent_suffix);
21532157 def : Pat<(call is_convergent, 1, imm:$rets, imm:$params, globaladdr:$addr, imm:$proto),
2154- (inst (to_tglobaladdr $addr), imm:$rets, imm:$params, imm:$proto)>;
2158+ (call_inst (to_tglobaladdr $addr), imm:$rets, imm:$params, imm:$proto)>;
21552159 def : Pat<(call is_convergent, 1, imm:$rets, imm:$params, i32:$addr, imm:$proto),
2156- (inst $addr, imm:$rets, imm:$params, imm:$proto)>;
2160+ (call_inst $addr, imm:$rets, imm:$params, imm:$proto)>;
21572161 def : Pat<(call is_convergent, 1, imm:$rets, imm:$params, i64:$addr, imm:$proto),
2158- (inst $addr, imm:$rets, imm:$params, imm:$proto)>;
2162+ (call_inst $addr, imm:$rets, imm:$params, imm:$proto)>;
21592163
2164+ defvar call_uni_inst = !cast<NVPTXInst>("CALL_UNI" # convergent_suffix);
21602165 def : Pat<(call is_convergent, 0, imm:$rets, imm:$params, globaladdr:$addr, 0),
2161- (inst_uni (to_tglobaladdr $addr), imm:$rets, imm:$params)>;
2166+ (call_uni_inst (to_tglobaladdr $addr), imm:$rets, imm:$params)>;
21622167 def : Pat<(call is_convergent, 0, imm:$rets, imm:$params, i32:$addr, 0),
2163- (inst_uni $addr, imm:$rets, imm:$params)>;
2168+ (call_uni_inst $addr, imm:$rets, imm:$params)>;
21642169 def : Pat<(call is_convergent, 0, imm:$rets, imm:$params, i64:$addr, 0),
2165- (inst_uni $addr, imm:$rets, imm:$params)>;
2170+ (call_uni_inst $addr, imm:$rets, imm:$params)>;
21662171}
21672172
21682173def LoadParamMemI64 : LoadParamMemInst<B64, ".b64">;
0 commit comments