[PATCH] D28307: Add Instruction number to LSR cost model (PR23384) part 1 of 3

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 11:55:44 PST 2017


hfinkel added inline comments.


================
Comment at: test/Transforms/LoopStrengthReduce/X86/lsr-insns-1.ll:14
+
+; CHECK: 7 asm-printer      - Number of machine instrs printed
+
----------------
evstupac wrote:
> hfinkel wrote:
> > Ah, okay. You're just counting the total number of instructions. Please actually match the desired output instruction pattern. Otherwise these tests will be fragile to unrelated changes.
> Well, the tests are really small and simple.
> I expect more fragility from instruction pattern.
> Anyway, if any change will increase instruction count here it would be a bad sign and the change author should pay attention to this.
> 
> Well, the tests are really small and simple.

This is exactly why matching the output you expect is reasonable.

> I expect more fragility from instruction pattern.

Perhaps, but make proper use of CHECK-DAG and named regular expressions for allocated registers and the test should not be fragile.



Repository:
  rL LLVM

https://reviews.llvm.org/D28307





More information about the llvm-commits mailing list