[InstCombine] Cleanup the TFE/LWE check in AMDGPU SimplifyDemanded
The fix added in r352904 is not quite correct, or rather misleading:
- When the texfailctrl (TFC) argument was non-constant, the fix assumed non-TFE/LWE, which is incorrect.
- Regardless, this code path cannot even be hit for correct TFE/LWE-enabled calls, because those return a struct. Added a test case for those for completeness.
Reviewers: hliao, dstuttard, arsenm
Subscribers: kzhuravl, jvesely, wdng, yaxunl, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D57681