[PATCH] D129306: [InstCombine] Do not fold 'and (sext (ashr X, Shift)), C' if Shift < 0

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 09:35:51 PDT 2022


fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.

LGTM, thanks!



================
Comment at: llvm/test/Transforms/InstCombine/pr56424.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -instcombine -S | FileCheck %s
+
----------------
might be worth to switch to the new pass manager syntax (`-passes=instcombine`)


================
Comment at: llvm/test/Transforms/InstCombine/pr56424.ll:5
+; This would crash if we didn't check for a negative shift.
+define i64 @test(i1, i32) {
+; CHECK-LABEL: @test(
----------------
could you name the arguments instead of having them implicitly numbered?


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

https://reviews.llvm.org/D129306



More information about the llvm-commits mailing list