[llvm] [InstCombine] Create new instructions instead of in-place operand replacement (PR #115988)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 28 07:49:09 PDT 2026


================
@@ -1842,3 +1842,14 @@ define i32 @test_umin_or_neg1_nuw(i32 %x, i32 range(i32 1, 0) %w) {
   %r = select i1 %cmp, i32 %x, i32 %sub
   ret i32 %r
 }
+
+; Make sure that poison-generating/UB-implying parameters are swapped.
+
+define i32 @umax_commute_operand_drop_attrs(i32 %x) {
----------------
nikic wrote:

drop -> swap?

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


More information about the llvm-commits mailing list