Skip to content

Commit aac0d91

Browse files
committed
Correct some codegen stats counters
1 parent a80a610 commit aac0d91

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/librustc_codegen_llvm/builder.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
277277
}
278278

279279
pub fn nswsub(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
280-
self.count_insn("nwsub");
280+
self.count_insn("nswsub");
281281
unsafe {
282282
llvm::LLVMBuildNSWSub(self.llbuilder, lhs, rhs, noname())
283283
}
@@ -291,14 +291,14 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
291291
}
292292

293293
pub fn fsub(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
294-
self.count_insn("sub");
294+
self.count_insn("fsub");
295295
unsafe {
296296
llvm::LLVMBuildFSub(self.llbuilder, lhs, rhs, noname())
297297
}
298298
}
299299

300300
pub fn fsub_fast(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
301-
self.count_insn("sub");
301+
self.count_insn("fsub");
302302
unsafe {
303303
let instr = llvm::LLVMBuildFSub(self.llbuilder, lhs, rhs, noname());
304304
llvm::LLVMRustSetHasUnsafeAlgebra(instr);
@@ -1315,6 +1315,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
13151315
}
13161316

13171317
pub fn add_incoming_to_phi(&self, phi: ValueRef, val: ValueRef, bb: BasicBlockRef) {
1318+
self.count_insn("addincoming");
13181319
unsafe {
13191320
llvm::LLVMAddIncoming(phi, &val, &bb, 1 as c_uint);
13201321
}

0 commit comments

Comments
 (0)