[all-commits] [llvm/llvm-project] b3cd44: Use SETNE directly rather than SUB/SETNE 0 for sta...
James Clarke via All-commits
all-commits at lists.llvm.org
Tue Feb 18 05:21:52 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: b3cd44f80b8d6de76d41f1c78241d782c77cd193
https://github.com/llvm/llvm-project/commit/b3cd44f80b8d6de76d41f1c78241d782c77cd193
Author: James Clarke <jrtc27 at jrtc27.com>
Date: 2020-02-18 (Tue, 18 Feb 2020)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
M llvm/test/CodeGen/SystemZ/stack-guard.ll
M llvm/test/CodeGen/Thumb/stack_guard_remat.ll
M llvm/test/CodeGen/WebAssembly/stack-protector.ll
Log Message:
-----------
Use SETNE directly rather than SUB/SETNE 0 for stack guard check
Summary:
Backends should fold the subtraction into the comparison, but not all
seem to. Moreover, on targets where pointers are not integers, such as
CHERI, an integer subtraction is not appropriate. Instead we should just
compare the two pointers directly, as this should work everywhere and
potentially generate more efficient code.
Reviewers: bogner, lebedev.ri, efriedma, t.p.northover, uweigand, sunfish
Reviewed By: lebedev.ri
Subscribers: dschuff, sbc100, arichardson, jgravelle-google, hiraditya, aheejin, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74454
More information about the All-commits
mailing list