[all-commits] [llvm/llvm-project] f02505: [MemCpyOpt] Handle unusual memcpy element type
Nikita Popov via All-commits
all-commits at lists.llvm.org
Sun Jun 27 07:22:00 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f025053977f330152da081b7060a5d9cba0a9e22
https://github.com/llvm/llvm-project/commit/f025053977f330152da081b7060a5d9cba0a9e22
Author: Nikita Popov <nikita.ppv at gmail.com>
Date: 2021-06-27 (Sun, 27 Jun 2021)
Changed paths:
M llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
M llvm/test/Transforms/MemCpyOpt/memset-memcpy-redundant-memset.ll
Log Message:
-----------
[MemCpyOpt] Handle unusual memcpy element type
Apparently, it is legal to use memcpy/memset with pointer types
other than i8*. Prior to 81fcdae68c5ff656c30032fd26c6a21af4c51dbb
this case was silently miscompiled, as the i8 offset calculation
was performed on some other type. Now it would crash due to a
type mismatch. Fix this by inserting an explicit bitcast to i8*.
More information about the All-commits
mailing list