[llvm] [InstCombine] Missed optimization for select a%2==0, (a/2*2)*(a/2*2), 0 (PR #92658)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 15 12:45:08 PDT 2024


================
@@ -2359,20 +2408,20 @@ static Instruction *foldSelectCmpBitcasts(SelectInst &Sel,
 /// operand, the result of the select will always be equal to its false value.
 /// For example:
 ///
-///   %cmpxchg = cmpxchg ptr %ptr, i64 %compare, i64 %new_value seq_cst seq_cst
-///   %val = extractvalue { i64, i1 } %cmpxchg, 0
-///   %success = extractvalue { i64, i1 } %cmpxchg, 1
-///   %sel = select i1 %success, i64 %compare, i64 %val
-///   ret i64 %sel
+///   %0 = cmpxchg i64* %ptr, i64 %compare, i64 %new_value seq_cst seq_cst
----------------
dtcxzyw wrote:

Please drop these changes.


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


More information about the llvm-commits mailing list