[all-commits] [llvm/llvm-project] a78a0f: [X86] Align f128 and i128 to 16 bytes when passing...
Trevor Gross via All-commits
all-commits at lists.llvm.org
Thu Jul 17 02:30:57 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a78a0f8d204393a0cce367b63395bad90311c1b8
https://github.com/llvm/llvm-project/commit/a78a0f8d204393a0cce367b63395bad90311c1b8
Author: Trevor Gross <tgross at intrepidcs.com>
Date: 2025-07-17 (Thu, 17 Jul 2025)
Changed paths:
M llvm/docs/ReleaseNotes.md
M llvm/lib/Target/X86/X86CallingConv.cpp
M llvm/lib/Target/X86/X86CallingConv.td
M llvm/lib/Target/X86/X86ISelLoweringCall.cpp
M llvm/test/CodeGen/X86/abds-neg.ll
M llvm/test/CodeGen/X86/abds.ll
M llvm/test/CodeGen/X86/abdu-neg.ll
M llvm/test/CodeGen/X86/abdu.ll
M llvm/test/CodeGen/X86/abs.ll
M llvm/test/CodeGen/X86/add-sub-bool.ll
M llvm/test/CodeGen/X86/arg-copy-elide.ll
M llvm/test/CodeGen/X86/avx512fp16-cvt.ll
M llvm/test/CodeGen/X86/bitselect.ll
M llvm/test/CodeGen/X86/bsf.ll
M llvm/test/CodeGen/X86/bsr.ll
M llvm/test/CodeGen/X86/bswap-wide-int.ll
M llvm/test/CodeGen/X86/div-rem-pair-recomposition-signed.ll
M llvm/test/CodeGen/X86/div-rem-pair-recomposition-unsigned.ll
M llvm/test/CodeGen/X86/fp128-cast-strict.ll
M llvm/test/CodeGen/X86/fp128-cast.ll
M llvm/test/CodeGen/X86/fp128-libcalls-strict.ll
M llvm/test/CodeGen/X86/fp128-libcalls.ll
M llvm/test/CodeGen/X86/fshl.ll
M llvm/test/CodeGen/X86/fshr.ll
M llvm/test/CodeGen/X86/funnel-shift.ll
M llvm/test/CodeGen/X86/i128-add.ll
M llvm/test/CodeGen/X86/i128-fp128-abi.ll
M llvm/test/CodeGen/X86/i128-sdiv.ll
M llvm/test/CodeGen/X86/i128-udiv.ll
M llvm/test/CodeGen/X86/iabs.ll
M llvm/test/CodeGen/X86/icmp-shift-opt.ll
M llvm/test/CodeGen/X86/mul128.ll
M llvm/test/CodeGen/X86/neg-abs.ll
M llvm/test/CodeGen/X86/popcnt.ll
M llvm/test/CodeGen/X86/pr46004.ll
M llvm/test/CodeGen/X86/scalar-fp-to-i32.ll
M llvm/test/CodeGen/X86/scalar-fp-to-i64.ll
M llvm/test/CodeGen/X86/scmp.ll
M llvm/test/CodeGen/X86/sdiv_fix.ll
M llvm/test/CodeGen/X86/sdiv_fix_sat.ll
M llvm/test/CodeGen/X86/shift-combine.ll
M llvm/test/CodeGen/X86/shift-i128.ll
M llvm/test/CodeGen/X86/smax.ll
M llvm/test/CodeGen/X86/smin.ll
M llvm/test/CodeGen/X86/ucmp.ll
M llvm/test/CodeGen/X86/udiv_fix.ll
M llvm/test/CodeGen/X86/udiv_fix_sat.ll
M llvm/test/CodeGen/X86/umax.ll
M llvm/test/CodeGen/X86/umin.ll
M llvm/test/CodeGen/X86/umulo-128-legalisation-lowering.ll
M llvm/test/CodeGen/X86/wide-integer-cmp.ll
Log Message:
-----------
[X86] Align f128 and i128 to 16 bytes when passing on x86-32 (#138092)
The i386 psABI specifies that `__float128` has 16 byte alignment and
must be passed on the stack; however, LLVM currently stores it in a
stack slot that has an offset of 4. Add a custom lowering to correct
this alignment to 16-byte.
i386 does not specify an `__int128`, but it seems reasonable to keep the
same behavior as `__float128` so this is changed as well. There also
isn't a good way to distinguish whether a set of four registers came
from an integer or a float.
The main test demonstrating this change is `store_perturbed` in
`llvm/test/CodeGen/X86/i128-fp128-abi.ll`.
Referenced ABI:
https://gitlab.com/x86-psABIs/i386-ABI/-/wikis/uploads/14c05f1b1e156e0e46b61bfa7c1df1e2/intel386-psABI-2020-08-07.pdf
Fixes: https://github.com/llvm/llvm-project/issues/77401
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