[all-commits] [llvm/llvm-project] 514f5b: [ConstantFolding] Fix dropped bits in non-integer-...
lijinpei-amd via All-commits
all-commits at lists.llvm.org
Tue Jun 9 02:52:15 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 514f5b766667c4c696b260f783403e8b41bc8798
https://github.com/llvm/llvm-project/commit/514f5b766667c4c696b260f783403e8b41bc8798
Author: lijinpei-amd <jinpli at amd.com>
Date: 2026-06-09 (Tue, 09 Jun 2026)
Changed paths:
M llvm/lib/Analysis/ConstantFolding.cpp
M llvm/test/Transforms/InstSimplify/bitcast-vector-fold.ll
Log Message:
-----------
[ConstantFolding] Fix dropped bits in non-integer-ratio bitcast with undef lane (#202282)
When constant-folding a vector bitcast(e.g. <4 x i24> -> <3 x i32>), an
undef source element inserted a DstBitSize-wide zero placeholder into
the bit buffer. This could clobber defined source element, producing a
wrong result on big-endian targets.
Fix by inserting SrcBitSize-wide zero instead.
Alive2 proof:
before (unsound): https://alive2.llvm.org/ce/z/R_ZQ75
after (verified): https://alive2.llvm.org/ce/z/VuV3mz
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