summaryrefslogtreecommitdiff
path: root/llvm/test/Bitcode/flags.ll
AgeCommit message (Collapse)Author
2024-10-15[IR] Add `samesign` flag to icmp instruction (#111419)elhewaty
Inspired by https://discourse.llvm.org/t/rfc-signedness-independent-icmps/81423
2024-04-09Add support for `nneg` flag with `uitofp`Noah Goldstein
As noted when #82404 was pushed (canonicalizing `sitofp` -> `uitofp`), different signedness on fp casts can have dramatic performance implications on different backends. So, it makes to create a reliable means for the backend to pick its cast signedness if either are correct. Further, this allows us to start canonicalizing `sitofp`- > `uitofp` which may easy middle end analysis. Closes #86141
2024-03-29[IR] Add nowrap flags for trunc instruction (#85592)elhewaty
This patch adds the nuw (no unsigned wrap) and nsw (no signed wrap) poison-generating flags to the trunc instruction. Discourse thread: https://discourse.llvm.org/t/rfc-add-nowrap-flags-to-trunc/77453
2023-11-24[IR] Add disjoint flag for Or instructions. (#72583)Craig Topper
This flag indicates that every bit is known to be zero in at least one of the inputs. This allows the Or to be treated as an Add since there is no possibility of a carry from any bit. If the flag is present and this property does not hold, the result is poison. This makes it easier to reverse the InstCombine transform that turns Add into Or. This is inspired by a comment here https://github.com/llvm/llvm-project/pull/71955#discussion_r1391614578 Discourse thread https://discourse.llvm.org/t/rfc-add-or-disjoint-flag/75036
2023-10-30[IR] Add zext nneg flag (#67982)Nikita Popov
Add an nneg flag to the zext instruction, which specifies that the argument is non-negative. Otherwise, the result is a poison value. The primary use-case for the flag is to preserve information when sext gets replaced with zext due to range-based canonicalization. The nneg flag allows us to convert the zext back into an sext later. This is useful for some optimizations (e.g. a signed icmp can fold with sext but not zext), as well as some targets (e.g. RISCV prefers sext over zext). Discourse thread: https://discourse.llvm.org/t/rfc-add-zext-nneg-flag/73914 This patch is based on https://reviews.llvm.org/D156444 by @Panagiotis156, with some implementation simplifications and additional tests. --------- Co-authored-by: Panagiotis K <karouzakispan@gmail.com>
2014-08-19verify-uselistorder: Force -preserve-bc-use-list-orderDuncan P. N. Exon Smith
llvm-svn: 216022
2014-07-31verify-uselistorder: Change the default -num-shuffles=5Duncan P. N. Exon Smith
Change the default for `-num-shuffles` to 5 and better document the algorithm in the header docs of `verify-uselistorder`. llvm-svn: 214419
2014-07-30Rename llvm-uselistorder => verify-uselistorderDuncan P. N. Exon Smith
llvm-svn: 214318
2014-07-29Bitcode: Correctly compare a Use against itselfDuncan P. N. Exon Smith
Fix the sort of expected order in the reader to correctly return `false` when comparing a `Use` against itself. This was caught by test/Bitcode/binaryIntInstructions.3.2.ll, so I'm adding a `RUN` line using `llvm-uselistorder` for every test in `test/Bitcode` that passes. A few tests still fail, so I'll investigate those next. This is part of PR5680. llvm-svn: 214157
2010-01-25Fix the bitcode reader to deserialize nuw/nsw/etc. bits properly in the caseDan Gohman
of a forward-reference, which doesn't use an "abbrev" encoding. llvm-svn: 94454