[all-commits] [llvm/llvm-project] ac4f30: [InstCombine] add test for miscompile in dropRedun...
RotateRight via All-commits
all-commits at lists.llvm.org
Wed Sep 29 08:45:34 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ac4f30ac49aafc1ab31b7090f8d69662686a6cfc
https://github.com/llvm/llvm-project/commit/ac4f30ac49aafc1ab31b7090f8d69662686a6cfc
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-09-29 (Wed, 29 Sep 2021)
Changed paths:
M llvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-after-truncation-variant-d.ll
Log Message:
-----------
[InstCombine] add test for miscompile in dropRedundantMaskingOfLeftShiftInput(); NFC (PR51351)
Commit: d3e2067c7c42200d487f7339e10b1e613576abef
https://github.com/llvm/llvm-project/commit/d3e2067c7c42200d487f7339e10b1e613576abef
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-09-29 (Wed, 29 Sep 2021)
Changed paths:
M llvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-after-truncation-variant-d.ll
M llvm/test/Transforms/InstSimplify/shift.ll
Log Message:
-----------
[InstSimplify] add tests for (-1 << x) s>> x; NFC
Commit: ea56dcb73012f65e6ffb1c320c97c6fbf45480e0
https://github.com/llvm/llvm-project/commit/ea56dcb73012f65e6ffb1c320c97c6fbf45480e0
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-09-29 (Wed, 29 Sep 2021)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
M llvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-after-truncation-variant-d.ll
Log Message:
-----------
[InstCombine] fix miscompile from dropRedundantMaskingOfLeftShiftInput()
The test is from https://llvm.org/PR51351.
There are 2 related logic bugs from over-generalizing "lshr" to "any shr",
but I'm not sure how to expose the difference for "MaskC" because instsimplify
already folds ashr of -1.
I'll extend instsimplify to catch the MaskD pattern as a follow-up, but this
patch should be enough to avoid the miscompile.
Compare: https://github.com/llvm/llvm-project/compare/9886f21bc138...ea56dcb73012
More information about the All-commits
mailing list