[llvm] [Reassociate] Drop weight reduction to fix issue 91417 (PR #91469)

Nuno Lopes via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 00:45:43 PDT 2024


================
@@ -1,69 +1,100 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
 ; RUN: opt < %s -passes=reassociate -S | FileCheck %s
 
 ; Tests involving repeated operations on the same value.
 
 define i8 @nilpotent(i8 %x) {
-; CHECK-LABEL: @nilpotent(
+; CHECK-LABEL: define i8 @nilpotent(
+; CHECK-SAME: i8 [[X:%.*]]) {
+; CHECK-NEXT:    ret i8 0
+;
   %tmp = xor i8 %x, %x
   ret i8 %tmp
-; CHECK: ret i8 0
 }
 
 define i2 @idempotent(i2 %x) {
-; CHECK-LABEL: @idempotent(
+; CHECK-LABEL: define i2 @idempotent(
+; CHECK-SAME: i2 [[X:%.*]]) {
+; CHECK-NEXT:    ret i2 -1
----------------
nunoplopes wrote:

this change is not correct. should be ret %x

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


More information about the llvm-commits mailing list