performFlagSettingCombine is a generalised version of performANDSCombine which also works on ADDS, SUBS, ADCS and SBCS
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
17801 | Should this be {N->ops()} to support the ADC case? Is it possible to write tests for the new opcode cases? | |
18818–18821 | Do the ADDS and SUBS cases occur today? If they do then can we have some tests. |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
17801 | I did try thi | |
17801 | 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. | |
18818–18821 | 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 | ||
---|---|---|
18818–18821 | 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. | |
18880–18881 | Is there a good reason to move this code? |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
18880–18881 | To group it with other calls to performFlagSettingCombine |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
18880–18881 | 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?