[all-commits] [llvm/llvm-project] 9a423a: [InstCombine] Avoid propagating invalid metadata i...
Muhammed Shiyas N via All-commits
all-commits at lists.llvm.org
Thu Jun 4 09:15:30 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9a423a22f4047a8e4daf678cc00393a8f3b7700a
https://github.com/llvm/llvm-project/commit/9a423a22f4047a8e4daf678cc00393a8f3b7700a
Author: Muhammed Shiyas N <114045581+Shiyas-N at users.noreply.github.com>
Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
M llvm/test/Transforms/InstCombine/select_meta.ll
Log Message:
-----------
[InstCombine] Avoid propagating invalid metadata in FoldOpIntoSelect (#199155)
Fixes #186471
FoldOpIntoSelect may create a select with a different result type from
the original instruction. The existing implementation blindly copied all
metadata from the original select, which could propagate invalid
type-specific metadata to the transformed instruction.
In particular, folding an fcmp over a floating-point select could copy
!fpmath metadata onto a non-FP select, producing invalid IR and causing
verifier failures.
This change preserves only metadata that remains valid for the
transformed select and propagates !fpmath only for FP-typed selects.
Debug locations are also preserved explicitly.
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