[all-commits] [llvm/llvm-project] b606e2: [Evaluator] Bitcast result of pointer stripping
aeubanks via All-commits
all-commits at lists.llvm.org
Wed Apr 21 13:37:14 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b606e2df4dd49c17c9f2733f2339b6dd0dd427de
https://github.com/llvm/llvm-project/commit/b606e2df4dd49c17c9f2733f2339b6dd0dd427de
Author: Arthur Eubanks <aeubanks at google.com>
Date: 2021-04-21 (Wed, 21 Apr 2021)
Changed paths:
M llvm/lib/Transforms/Utils/Evaluator.cpp
M llvm/test/Transforms/GlobalOpt/invariant.group.ll
Log Message:
-----------
[Evaluator] Bitcast result of pointer stripping
Trying to evaluate a GEP would assert with
"Ty == cast<PointerType>(C->getType()->getScalarType())->getElementType()"
because the type of the pointer we would evaluate the GEP argument to
would be a different type than the GEP was expecting. We should treat
pointer stripping as a bitcast.
The test adds a redundant GEP that would crash due to type mismatch.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D100970
More information about the All-commits
mailing list