Add checks for the bit width in two places in SystemZTargetTransformInfo.cpp
Diff Detail
Event Timeline
LGTM with one minor
llvm/test/Analysis/CostModel/SystemZ/huge-immediates.ll | ||
---|---|---|
1 | Might be worth adding a FileCheck - you can use update_analyze_test_checks.py to handle it. |
llvm/test/Analysis/CostModel/SystemZ/huge-immediates.ll | ||
---|---|---|
1 | The reason that I left that out is that the cost values for these i72 instructions do not quite make sense. A comparison with an i72 immediate gets the cost of '1', which is certainly too little. However, we do not care about those costs, so it makes most sense to me then to not check for their values either. Is it then ok to leave it as is, or is it better for some reason to auto-generate the full test with the CHECKs? |
llvm/test/Analysis/CostModel/SystemZ/huge-immediates.ll | ||
---|---|---|
1 | yes its ok to leave them out if you don't think they're useful - sometimes you learn something "interesting" by including them (especially for non-legal types) |
Bit tricky without context diff but I think you can just use C->isZero() and drop the ScalarBits limit