performFlagSettingCombine is a generalised version of performANDSCombine which also works on ADDS, SUBS, ADCS and SBCS
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
17706 | Should this be {N->ops()} to support the ADC case? Is it possible to write tests for the new opcode cases? | |
18723–18726 | Do the ADDS and SUBS cases occur today? If they do then can we have some tests. |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
17706 | I did try thi | |
17706 | I couldn't find a way to construct an ArrayRef<SDValue> that would live long enough: the ArrayRef would get dropped at the end of the function while the Generic node still held a reference to its contents, leading to a segfault later. Suggest to leave it as is for now. | |
18723–18726 | Could not generate any tests where these transforms would fire, but its worth leaving these in for completeness: they might become applicable later if new transforms add the opportunity for them to apply. |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
18723–18726 | I disagree. Although the code is likely fine if there's no way to test it then it's just stale, potentially buggy code that bloats the compiler. | |
18785–18786 | Is there a good reason to move this code? |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
18785–18786 | To group it with other calls to performFlagSettingCombine |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
18785–18786 | That's not a great reason, especially since it's no longer true. But it's minor so I'll not worry about it. |
Should this be {N->ops()} to support the ADC case? Is it possible to write tests for the new opcode cases?