Add _L to _LZ image intrinsic table mapping to table gen.
In ISelLowering check if image intrinsic has lod and if it's equal
to zero, if so remove lod and change opcode to equivalent mapped _LZ.
Change-Id: Ie24cd7e788e2195d846c7bd256151178cbb9ec71
Differential D49483
[AMDGPU] Optimize _L image intrinsic to _LZ when lod is zero Authored by rtaylor on Jul 18 2018, 6:58 AM.
Details Add _L to _LZ image intrinsic table mapping to table gen. Change-Id: Ie24cd7e788e2195d846c7bd256151178cbb9ec71
Diff Detail
Event Timeline
Comment Actions This could be done in the IR but this avoids a long(er) switch statement (# of combinations) and keeps more of the image intrinsic work in the same place, which seemed per conversations the best way to go. Is there some advantage to moving this to the IR (InstCombine for example)?
Comment Actions I don't think doing this as an IR pass has any advantage, so this is fine. Please add tests for gather intrinsics as well, apart from that it looks good to me.
| ||||||||||||||||||