diff options
| author | David Green <david.green@arm.com> | 2023-06-05 14:42:08 +0100 |
|---|---|---|
| committer | David Green <david.green@arm.com> | 2023-06-05 14:42:08 +0100 |
| commit | 27aea17fe061f9778bb1e8ff5fdf9fc0fb03abe1 (patch) | |
| tree | 0437f267ecdb4bc9a44aceb8db20d3a93fdd31d4 /llvm/lib/CodeGen/TypePromotion.cpp | |
| parent | c2926c6c4da7c2650ee43c99845331ae36092280 (diff) | |
[TypePromotion] Don't treat bitcast as a Source
This removes BitCasts from isSource in Type Promotion, as I don't believe they
need to be treated as Sources. They will usually be from floats or hoisted
constants, where constants will be handled already.
This fixes #62513, but didn't otherwise cause any differences in the tests I
ran.
Differential Revision: https://reviews.llvm.org/D152112
Diffstat (limited to 'llvm/lib/CodeGen/TypePromotion.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/TypePromotion.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TypePromotion.cpp b/llvm/lib/CodeGen/TypePromotion.cpp index 028ca7bc25d7..a6ec106f30f9 100644 --- a/llvm/lib/CodeGen/TypePromotion.cpp +++ b/llvm/lib/CodeGen/TypePromotion.cpp @@ -235,8 +235,6 @@ bool TypePromotionImpl::isSource(Value *V) { return true; else if (isa<LoadInst>(V)) return true; - else if (isa<BitCastInst>(V)) - return true; else if (auto *Call = dyn_cast<CallInst>(V)) return Call->hasRetAttr(Attribute::AttrKind::ZExt); else if (auto *Trunc = dyn_cast<TruncInst>(V)) |
