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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 09:39:33 PDT 2022


spatel added inline comments.


================
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(
----------------
fhahn wrote:
> could you name the arguments instead of having them implicitly numbered?
Nit: I find it a little easier for subsequent bug-hunting and archaeology if you put this test next to the existing tests for the buggy fold.
You can then name the test `@PR56424` and/or put a link to the issue in the test comment.


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

https://reviews.llvm.org/D129306



More information about the llvm-commits mailing list