aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2021-06-11 10:56:05 +0100
committerSimon Pilgrim <llvm-dev@redking.me.uk>2021-06-11 10:56:19 +0100
commit646e970d44d7eaf4f56e2956fb58b48eb9360cb3 (patch)
treefe776ba9d29a5adfac785f609d7bf7f63a1a38eb /clang/lib/CodeGen
parent57006d2f6d96d8a6836ae901218ed615071b3b8e (diff)
downloadllvm-646e970d44d7eaf4f56e2956fb58b48eb9360cb3.zip
llvm-646e970d44d7eaf4f56e2956fb58b48eb9360cb3.tar.gz
llvm-646e970d44d7eaf4f56e2956fb58b48eb9360cb3.tar.bz2
[llvm-stress] Fix dead code preventing us generating per-element vector selects
This has been reported several times by the PVS Studio team as well as coming up in some static analysis. getRandom() % 1 always returns 0 so we never actually test this codepath, (git blame suggests this has always been like this) - given that we have plenty of other "getRandom() & 1" the typo is pretty obvious, and matches the intention in the comment above - with this change we generate a nice mixture of scalar/vector condition selects of vectors. I don't know llvm-stress that well - but I don't think we guarantee that the same seed value will always generate the same IR for later versions of the program - just that the same binary would. Differential Revision: https://reviews.llvm.org/D104022
Diffstat (limited to 'clang/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions