[all-commits] [llvm/llvm-project] 80a0a0: [ValueTracking] Add tests for computing knownbits ...
goldsteinn via All-commits
all-commits at lists.llvm.org
Thu May 16 11:04:38 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 80a0a067fb8cc3122f53083fd2fe20f9d5dfc5bf
https://github.com/llvm/llvm-project/commit/80a0a067fb8cc3122f53083fd2fe20f9d5dfc5bf
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2024-05-16 (Thu, 16 May 2024)
Changed paths:
M llvm/test/Transforms/InstCombine/known-bits.ll
Log Message:
-----------
[ValueTracking] Add tests for computing knownbits from `(icmp upred (add/sub nuw X, Y), C)`; NFC
Commit: 05347f8c2fde0cde2fd12f1ec3611eeaf666ece0
https://github.com/llvm/llvm-project/commit/05347f8c2fde0cde2fd12f1ec3611eeaf666ece0
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2024-05-16 (Thu, 16 May 2024)
Changed paths:
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/test/Transforms/InstCombine/known-bits.ll
Log Message:
-----------
[ValueTracking] Compute knownbits from `(icmp upred (add/sub nuw X, Y), C)`
`(icmp ule/ult (add nuw X, Y), C)` implies both `(icmp ule/ult X, C)` and
`(icmp ule/ult Y, C)`. We can use this to deduce leading zeros in `X`/`Y`.
`(icmp uge/ugt (sub nuw X, Y), C)` implies `(icmp uge/uge X, C)` . We
can use this to deduce leading ones in `X`.
Proofs: https://alive2.llvm.org/ce/z/sc5k22
Closes #87180
Commit: ebbf484e1c62a312d88c7f6482af11a58d40f52d
https://github.com/llvm/llvm-project/commit/ebbf484e1c62a312d88c7f6482af11a58d40f52d
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2024-05-16 (Thu, 16 May 2024)
Changed paths:
M llvm/test/Transforms/InstCombine/icmp-trunc.ll
Log Message:
-----------
[InstCombine] Add tests for folding `(icmp pred (trunc nuw/nsw X), C)`; NFC
Commit: 23f1047daac9702876ca99b53e8fe649fca569fa
https://github.com/llvm/llvm-project/commit/23f1047daac9702876ca99b53e8fe649fca569fa
Author: Noah Goldstein <goldstein.w.n at gmail.com>
Date: 2024-05-16 (Thu, 16 May 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/test/Transforms/InstCombine/icmp-trunc.ll
Log Message:
-----------
[InstCombine] Fold `(icmp pred (trunc nuw/nsw X), C)` -> `(icmp pred X, (zext/sext C))`
This is valid as long as the sign of the wrap flag doesn't differ from
the sign of the `pred`.
Proofs: https://alive2.llvm.org/ce/z/35NsrR
NB: The online Alive2 hasn't been updated with `trunc nuw/nsw`
support, so the proofs must be reproduced locally.
Closes #87935
Compare: https://github.com/llvm/llvm-project/compare/525bd66fc29f...23f1047daac9
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list