Match how the generic implementation handles this. We now will leave
behind the dead other user for later passes to deal with.
Details
Diff Detail
Event Timeline
llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp | ||
---|---|---|
1289 | Changed is always false, right? |
Do you think it's worth running a pass like InstSimplify after the tests to check the instruction does get eliminated?
Maybe with a different CHECK line?
Otherwise I think it's error prone, if someone makes a change that makes the inst not dead anymore all we would see in the test diff is an operand that's renamed
llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp | ||
---|---|---|
94–99 | nit: add docs, or use a small struct, otherwise it's difficult to tell what the tuple contains | |
1251–1262 | small nit: avoids repetition |
No, it wouldn't be testing anything meaningful. If you don't have the right declaration attributes, it won't be deleted. You'd have to depend on the manually specified attributes in the test. The declarations in whatever source would have to be correct, or the attributes would have to be correct after linking (which is what actually happens)
nit: add docs, or use a small struct, otherwise it's difficult to tell what the tuple contains