Changes isIntDivCheap() target query to take function attributes instead of a boolean optimization flag. Targets can use the function attributes to make more informed size/speed trade-offs, particularly for borderline -Os optimized code.
Refactors default BuildSDIVPow2 to call isIntDivCheap() in order to simplify SDIV by power-of-2 logic.
Adds a new regression test for x86, which is the only in-tree target that implements isIntDivCheap(). The test verifies that -Oz optimization level produces IDIV and -Os optimization level expands to a non-IDIV sequence.
Bonus point if you add a comment on top of this one as well :)