[all-commits] [llvm/llvm-project] 5197d2: [SimplifyLibCalls] Move handling of constant char ...
Martin Sebor via All-commits
all-commits at lists.llvm.org
Mon Apr 4 02:01:49 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5197d2791f908815134ad48d7b966de2d8c47eeb
https://github.com/llvm/llvm-project/commit/5197d2791f908815134ad48d7b966de2d8c47eeb
Author: Martin Sebor <msebor at redhat.com>
Date: 2022-04-04 (Mon, 04 Apr 2022)
Changed paths:
M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
Log Message:
-----------
[SimplifyLibCalls] Move handling of constant char earlier (NFC)
Handle the simple constant char case before the bitmask optimization.
This will allow extending the code to handle a non-constant size
argument in a followup change.
Split out from https://reviews.llvm.org/D122836.
Commit: 5ccfd5f6d43069a5bc152b335bc704c6d2584ddc
https://github.com/llvm/llvm-project/commit/5ccfd5f6d43069a5bc152b335bc704c6d2584ddc
Author: Martin Sebor <msebor at redhat.com>
Date: 2022-04-04 (Mon, 04 Apr 2022)
Changed paths:
M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
M llvm/test/Transforms/InstCombine/memchr-2.ll
Log Message:
-----------
[SimplifyLibCalls] Optimize memchr() with known char+str and unknown length
If both the character and string are known, but the length
potentially isn't, we can optimize the memchr() call to a select
of either the known position of the character or null.
Split off from https://reviews.llvm.org/D122836.
Compare: https://github.com/llvm/llvm-project/compare/d333b382701e...5ccfd5f6d430
More information about the All-commits
mailing list