[all-commits] [llvm/llvm-project] 4d5856: [GlobalISel][AArch64] Improve legalization of shif...
Ömer Sinan Ağacan via All-commits
all-commits at lists.llvm.org
Fri Jul 10 23:42:15 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4d5856669efa7a1271d2f5201bb3ebf32420ffde
https://github.com/llvm/llvm-project/commit/4d5856669efa7a1271d2f5201bb3ebf32420ffde
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date: 2026-07-11 (Sat, 11 Jul 2026)
Changed paths:
M llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
M llvm/test/CodeGen/AArch64/GlobalISel/legalize-shift.mir
Log Message:
-----------
[GlobalISel][AArch64] Improve legalization of shift amounts (#208676)
Fixes crashes when the shift amount type is already between s32 and s64,
but not s32 or s64.
The shift amount should have the same type with the shifted value for
the shift instructions, so add the same `widenScalarToNextPow2`
legalization that we apply to the shifted value, to the shift amount.
Fixes crashes in programs like:
define i8 @test(i48 %a) {
entry:
%b = lshr i48 %a, 15
%c = trunc i48 %b to i8
ret i8 %c
}
The new test crashes before this PR.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list