[PATCH] [ARM] Keep track of previous changes to the bit pattern stored HW_FP

Renato Golin renato.golin at linaro.org
Wed Jun 24 10:55:07 PDT 2015

In http://reviews.llvm.org/D10395#191786, @rs wrote:

> I don't mind adding a test for this but it seems unrelated to the bug I'm trying to fix in this patch, could you explain a bit more as to why you want this test?

There was a behaviour that prompted you to implement this fix: The macro wasn't defined in some cases. You changed the behaviour of an FP-selection routine, and all tests still pass. This means two things:

1. The tests weren't good enough to cover for the case you saw because...
2. The wrong behaviour you're fixing is not easy to test.

The tests are not meant to always exactly reproduce the behaviour, but if you can get an internal behaviour tested which will reflect in the macro being set, then that's a good way to make sure the macro will never be broken again. That's the very essence of unit testing.

My suggestion that you could check the target features is that, in a way, they will reflect that doesn't matter the order in which you put them in, the FP macro will be set. It doesn't have to have the macro in it at all, just the justification that, with the corner cases covered, the macro will be set.



More information about the llvm-commits mailing list