@@ -132,11 +132,15 @@ bool X86FixupInstTuningPass::processInstruction(
132
132
auto ProcessVPERMILPDri = [&](unsigned NewOpc) -> bool {
133
133
if (!NewOpcPreferable (NewOpc))
134
134
return false ;
135
- unsigned MaskImm = MI.getOperand (NumOperands - 1 ).getImm ();
136
- MI.removeOperand (NumOperands - 1 );
137
- MI.addOperand (MI.getOperand (NumOperands - 2 ));
138
- MI.setDesc (TII->get (NewOpc));
139
- MI.addOperand (MachineOperand::CreateImm (MaskImm));
135
+ LLVM_DEBUG (dbgs () << " Replacing: " << MI);
136
+ {
137
+ unsigned MaskImm = MI.getOperand (NumOperands - 1 ).getImm ();
138
+ MI.removeOperand (NumOperands - 1 );
139
+ MI.addOperand (MI.getOperand (NumOperands - 2 ));
140
+ MI.setDesc (TII->get (NewOpc));
141
+ MI.addOperand (MachineOperand::CreateImm (MaskImm));
142
+ }
143
+ LLVM_DEBUG (dbgs () << " With: " << MI);
140
144
return true ;
141
145
};
142
146
@@ -147,11 +151,15 @@ bool X86FixupInstTuningPass::processInstruction(
147
151
auto ProcessVPERMILPSri = [&](unsigned NewOpc) -> bool {
148
152
if (!NewOpcPreferable (NewOpc))
149
153
return false ;
150
- unsigned MaskImm = MI.getOperand (NumOperands - 1 ).getImm ();
151
- MI.removeOperand (NumOperands - 1 );
152
- MI.addOperand (MI.getOperand (NumOperands - 2 ));
153
- MI.setDesc (TII->get (NewOpc));
154
- MI.addOperand (MachineOperand::CreateImm (MaskImm));
154
+ LLVM_DEBUG (dbgs () << " Replacing: " << MI);
155
+ {
156
+ unsigned MaskImm = MI.getOperand (NumOperands - 1 ).getImm ();
157
+ MI.removeOperand (NumOperands - 1 );
158
+ MI.addOperand (MI.getOperand (NumOperands - 2 ));
159
+ MI.setDesc (TII->get (NewOpc));
160
+ MI.addOperand (MachineOperand::CreateImm (MaskImm));
161
+ }
162
+ LLVM_DEBUG (dbgs () << " With: " << MI);
155
163
return true ;
156
164
};
157
165
@@ -164,7 +172,11 @@ bool X86FixupInstTuningPass::processInstruction(
164
172
if (!ST->hasNoDomainDelayShuffle () ||
165
173
!NewOpcPreferable (NewOpc, /* ReplaceInTie*/ false ))
166
174
return false ;
167
- MI.setDesc (TII->get (NewOpc));
175
+ LLVM_DEBUG (dbgs () << " Replacing: " << MI);
176
+ {
177
+ MI.setDesc (TII->get (NewOpc));
178
+ }
179
+ LLVM_DEBUG (dbgs () << " With: " << MI);
168
180
return true ;
169
181
};
170
182
@@ -185,9 +197,12 @@ bool X86FixupInstTuningPass::processInstruction(
185
197
auto ProcessUNPCK = [&](unsigned NewOpc, unsigned MaskImm) -> bool {
186
198
if (!NewOpcPreferable (NewOpc, /* ReplaceInTie*/ false ))
187
199
return false ;
188
-
189
- MI.setDesc (TII->get (NewOpc));
190
- MI.addOperand (MachineOperand::CreateImm (MaskImm));
200
+ LLVM_DEBUG (dbgs () << " Replacing: " << MI);
201
+ {
202
+ MI.setDesc (TII->get (NewOpc));
203
+ MI.addOperand (MachineOperand::CreateImm (MaskImm));
204
+ }
205
+ LLVM_DEBUG (dbgs () << " With: " << MI);
191
206
return true ;
192
207
};
193
208
@@ -198,7 +213,11 @@ bool X86FixupInstTuningPass::processInstruction(
198
213
if (!ST->hasNoDomainDelayShuffle () ||
199
214
!NewOpcPreferable (NewOpc, /* ReplaceInTie*/ false ))
200
215
return false ;
201
- MI.setDesc (TII->get (NewOpc));
216
+ LLVM_DEBUG (dbgs () << " Replacing: " << MI);
217
+ {
218
+ MI.setDesc (TII->get (NewOpc));
219
+ }
220
+ LLVM_DEBUG (dbgs () << " With: " << MI);
202
221
return true ;
203
222
};
204
223
@@ -229,8 +248,12 @@ bool X86FixupInstTuningPass::processInstruction(
229
248
return false ;
230
249
if (!OptSize && !NewOpcPreferable (MovOpc))
231
250
return false ;
232
- MI.setDesc (TII->get (MovOpc));
233
- MI.removeOperand (NumOperands - 1 );
251
+ LLVM_DEBUG (dbgs () << " Replacing: " << MI);
252
+ {
253
+ MI.setDesc (TII->get (MovOpc));
254
+ MI.removeOperand (NumOperands - 1 );
255
+ }
256
+ LLVM_DEBUG (dbgs () << " With: " << MI);
234
257
return true ;
235
258
};
236
259
0 commit comments