[PATCH] D67638: Improve __builtin_constant_p lowering
Joerg Sonnenberger via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 16 15:16:08 PDT 2019
joerg created this revision.
joerg added a reviewer: rsmith.
Herald added subscribers: kristina, kbarton, nemanjai.
Herald added a project: clang.
Herald added a subscriber: wuzish.
__builtin_constant_p used to be short-cut evaluated to false when building with -O0. This is undesirable as it means that constant folding in the front-end can give different results than folding in the back-end. It can also create conditional branches on constant conditions that don't get folded away. With the improvements to the llvm.is.constant handling on the LLVM side, the short-cut is no longer useful.
Adjust various codegen tests to not depend on the optimizations.
Repository:
rC Clang
https://reviews.llvm.org/D67638
Files:
lib/CodeGen/CGBuiltin.cpp
test/CodeGen/builtin-constant-p.c
test/CodeGen/ppc-emmintrin.c
test/CodeGen/ppc-tmmintrin.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67638.220398.patch
Type: text/x-patch
Size: 12053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190916/07ab7949/attachment.bin>
More information about the cfe-commits
mailing list