[PATCH] D144369: [InstCombine] Remove early constant fold

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 20 02:05:04 PST 2023


nikic added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/pr38677.ll:15
 ; CHECK-NEXT:    store i1 false, ptr [[DST:%.*]], align 1
-; CHECK-NEXT:    ret i32 [[USE2]]
+; CHECK-NEXT:    ret i32 1
 ;
----------------
The reason for this change is that select constant folding in InstSimplify will only return if the select actually folds, not if it would create a constant expression. Arguably this is a bug in InstSimplify, but I decided not to fix it, since we don't actually want these select constant expressions.


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

https://reviews.llvm.org/D144369



More information about the llvm-commits mailing list