[PATCH] D142585: AMDGPU: Try to push fneg as integer into select

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 06:23:03 PST 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:9983
+    if (CRHS && CRHS->getAPIntValue().isSignMask() &&
+        shouldFoldFNegIntoSrc(N, LHS)) {
+      SDLoc DL(N);
----------------
Pierre-vh wrote:
> Where is this function defined? In a parent diff?
> 
> Also would the transform still be profitable if the SELECT has >1 user and won't be deleted after the combine runs?
Yes, I added it to the stack. The hasOneUse condition is covered under shouldFoldFNegIntoSrc, it's more complicated than normal because we can move modifiers up and down 


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

https://reviews.llvm.org/D142585



More information about the llvm-commits mailing list