[PATCH] D33757: [Profile] Fix builtin_expect lowering bug
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 1 00:06:00 PDT 2017
davidxl created this revision.
There is an obvious bug in the lowering code when non-boolean integer value is expected. The existing code wrongly assumes the NE comparison's constant operand is always zero and also skips EQ predicate. This either produces wrong profile annotation or misses annotation.
Other predicate kinds should also be supported (separately).
https://reviews.llvm.org/D33757
Files:
lib/Transforms/Scalar/LowerExpectIntrinsic.cpp
test/Transforms/LowerExpectIntrinsic/expect_nonboolean.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33757.100963.patch
Type: text/x-patch
Size: 4847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170601/2b041725/attachment.bin>
More information about the llvm-commits
mailing list