about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBen Harris <mail@bharr.is>2018-07-09 09:24:42 +0200
committerBen Harris <mail@bharr.is>2018-07-09 09:40:16 +0200
commitaac0d914b2d776c43d6c95054815f49e19792e6e (patch)
tree76d05ed8fcf36bff5ca77a9632e625e915e68997
parenta80a610a4c30b6f5f60862afcb4588d03439f66c (diff)
downloadrust-aac0d914b2d776c43d6c95054815f49e19792e6e.tar.gz
rust-aac0d914b2d776c43d6c95054815f49e19792e6e.zip
Correct some codegen stats counters
-rw-r--r--src/librustc_codegen_llvm/builder.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/librustc_codegen_llvm/builder.rs b/src/librustc_codegen_llvm/builder.rs
index 7b4998e8588..c71e49b0d88 100644
--- a/src/librustc_codegen_llvm/builder.rs
+++ b/src/librustc_codegen_llvm/builder.rs
@@ -277,7 +277,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
     }
 
     pub fn nswsub(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
-        self.count_insn("nwsub");
+        self.count_insn("nswsub");
         unsafe {
             llvm::LLVMBuildNSWSub(self.llbuilder, lhs, rhs, noname())
         }
@@ -291,14 +291,14 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
     }
 
     pub fn fsub(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
-        self.count_insn("sub");
+        self.count_insn("fsub");
         unsafe {
             llvm::LLVMBuildFSub(self.llbuilder, lhs, rhs, noname())
         }
     }
 
     pub fn fsub_fast(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
-        self.count_insn("sub");
+        self.count_insn("fsub");
         unsafe {
             let instr = llvm::LLVMBuildFSub(self.llbuilder, lhs, rhs, noname());
             llvm::LLVMRustSetHasUnsafeAlgebra(instr);
@@ -1315,6 +1315,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
     }
 
     pub fn add_incoming_to_phi(&self, phi: ValueRef, val: ValueRef, bb: BasicBlockRef) {
+        self.count_insn("addincoming");
         unsafe {
             llvm::LLVMAddIncoming(phi, &val, &bb, 1 as c_uint);
         }