[PATCH] D23355: getInstSizeInBytes: sentinel value fix for AArch64, AMDGPU, MSP430

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 16:04:41 PST 2017


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:338-340
+      unsigned InstSize = TII->getInstSizeInBytes(MI);
+      assert(InstSize != ~0U && "Failed to get instruction size");
+      CodeSize += InstSize;
----------------
Maybe add a TII->getKnownInstSizeInBytes to avoid repeating the same assertion in N places?


https://reviews.llvm.org/D23355





More information about the llvm-commits mailing list