[PATCH] D110076: [AMDGPU][GlobalISel] Code quality: Combine V_RSQ

Mateja Marjanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 21 05:54:56 PDT 2021


matejam added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstructions.td:830
 
+let OtherPredicates = [UnsafeFPMath] in {
+
----------------
arsenm wrote:
> I don't understand this change. Are you saying this is a dead selection pattern for the DAG? Should we be doing this in the combiner instead and just delete this? That way we could consider the fast math flags and not rely on the function attribute
I am, with or without this pattern SDAG combines v_sqrt + v_rcp into v_rsq. I'm not sure which would be better to leave this as a pattern or write a combiner for this. In fact SDAG doesn't even need any flags to combine into v_rsq. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110076/new/

https://reviews.llvm.org/D110076



More information about the llvm-commits mailing list