[all-commits] [llvm/llvm-project] 5dd7d2: [InstCombine] Don't change switch table from desir...
David Green via All-commits
all-commits at lists.llvm.org
Fri Oct 28 02:15:56 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5dd7d2ce67171c11f2d9757977937f41670900fb
https://github.com/llvm/llvm-project/commit/5dd7d2ce67171c11f2d9757977937f41670900fb
Author: David Green <david.green at arm.com>
Date: 2022-10-28 (Fri, 28 Oct 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
M llvm/test/Transforms/InstCombine/known-phi-recurse.ll
M llvm/test/Transforms/InstCombine/narrow-switch.ll
M llvm/test/Transforms/PhaseOrdering/pr44461-br-to-switch-rotate.ll
Log Message:
-----------
[InstCombine] Don't change switch table from desirable to illegal types
In InstCombine we treat i8/i16 as desirable, even if they are not legal.
The current logic in shouldChangeType will decide to convert from an
illegal but desirable type (such as an i8) to an illegal and undesirable
type (such as i3). This patch prevents changing the switch conditions to
an irregular type on like Arm/AArch64 where i8/i16 are not legal.
This is the same issue as https://reviews.llvm.org/D54115. In the case I
was looking it is was converting an i32 switch to an i8 switch, which
then became a i3 switch.
Differential Revision: https://reviews.llvm.org/D136763
More information about the All-commits
mailing list