fix cut+paste typo
Just wanted to say that I think I agree with the design choices here!
LGTM just with the naming nit from James (header_t&->const HeaderType&)
Removed useless else block with return.
Address review notes - just use isOperationLegalOrCustom(), entirety of check-llvm-codegen still passes at least.
Add a few more examples of physical registers not folding
Changed to use the top level LLVM build option.
Isn't [[no_unique_address]] only significant for empty members? I'm not sure why they need significant support from constant-building, since they expand to no meaningful initializer.
It also permits reuse of tail padding for non-static data members, which is the complexity that this patch is dealing with (in addition to improving and generalizing the support for non-trivial designated initializers).
Maybe I'm missing something, but the override implemented in D63204 looks like a subset of the default TII::getRegClass that falls through to TRI::getRegClass, just like the default does. Is this change actually necessary?
Thank you for the reviews.
LGTM. I have no idea if it's worth the trade-off, but we could do this sooner in IR (instcombine) instead of or in addition to SDAG?
Indeed, this fold is missed in middle-end too, but the regression at hand is in back-end test,
so i'm not sure if we should just hand-wave and only fix it in middle-end.
Also, where should the middle-end fix be? Again InstCombine?
How terrible would it be to use APInt as the interface type, but then store it as int64_t?