[all-commits] [llvm/llvm-project] 0f99a7: [X86] Teach combineVectorShiftImm to constant fold...
topperc via All-commits
all-commits at lists.llvm.org
Tue Jun 16 12:30:53 PDT 2020
Branch: refs/heads/release/10.x
Home: https://github.com/llvm/llvm-project
Commit: 0f99a730e3bf9e4aa29d2d6c407394022527e409
https://github.com/llvm/llvm-project/commit/0f99a730e3bf9e4aa29d2d6c407394022527e409
Author: Craig Topper <craig.topper at gmail.com>
Date: 2020-06-16 (Tue, 16 Jun 2020)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/test/CodeGen/X86/vec_shift5.ll
Log Message:
-----------
[X86] Teach combineVectorShiftImm to constant fold undef elements to 0 not undef.
Shifts are supposed to always shift in zeros or sign bits regardless of their inputs. It's possible the input value may have been replaced with undef by SimplifyDemandedBits, but the shift in zeros are still demanded.
This issue was reported to me by ispc from 10.0. Unfortunately their failing test does not fail on trunk. Seems to be because the shl is optimized out earlier now and doesn't become VSHLI.
ispc bug https://github.com/ispc/ispc/issues/1771
Differential Revision: https://reviews.llvm.org/D81212
(cherry picked from commit 7c9a89fed8f5d53d61fe3a61a2581a7c28b1b6d2)
Commit: ea65b89665c7edcd72ae924d4efad83e79931cd6
https://github.com/llvm/llvm-project/commit/ea65b89665c7edcd72ae924d4efad83e79931cd6
Author: Craig Topper <craig.topper at gmail.com>
Date: 2020-06-16 (Tue, 16 Jun 2020)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/test/CodeGen/X86/vec_shift5.ll
Log Message:
-----------
[X86] Fold undef elts to 0 in getTargetVShiftByConstNode.
Similar to D81212.
Differential Revision: https://reviews.llvm.org/D81292
(cherry picked from commit 3408dcbdf054ac3cc32a97a6a82a3cf5844be609)
Compare: https://github.com/llvm/llvm-project/compare/756b482c69be...ea65b89665c7
More information about the All-commits
mailing list