[llvm] [AMDGPU] Fix missing `IsExact` flag when expanding vector binary operator (PR #86712)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 02:34:22 PDT 2024


================
@@ -1594,6 +1594,11 @@ bool AMDGPUCodeGenPrepareImpl::visitBinaryOperator(BinaryOperator &I) {
           }
         }
 
+        if (auto *NewEltI = dyn_cast<Instruction>(NewElt))
+          if (PossiblyExactOperator::isPossiblyExactOpcode(
----------------
jayfoad wrote:

Can you use something simpler like `NewEltI->copyIRFlags(I)`?

https://github.com/llvm/llvm-project/pull/86712


More information about the llvm-commits mailing list