[SPIRV] Add PreLegalizer pattern matching for `degrees` GL extension
Follow-up to #213096.
Following the degrees implementation move, SPIR-V now lowers degrees as a generic fmul instead of the GL extension:
degrees(x) ->
fmul x, (180 / pi)
We can pattern match this in SPIRVCombine.td and SPIRVCombinerHelper.cpp to
fmul(
x,
(180 / pi))
which would allow us to change fmul(x, 180/pi) back into degrees(x) so that SPIR-V emits the GL extension again.
Can take this up
@albertbolt1 Thanks! The issue has been assigned to you. Since it's a follow-up, it's probably best to wait until the parent issue is closed before working on this. It should be closed very soon.
Edit: Follow-up issue has been closed!
Hi @kmpeng I have added the PR to the issue https://github.com/llvm/llvm-project/pull/216506