[llvm] [clang] [InstCombine] Infer zext nneg flag (PR #71534)

2023-11-09 Thread via cfe-commits
mikaelholmen wrote: > Should be fixed by > [1b1c817](https://github.com/llvm/llvm-project/commit/1b1c81772fe50a1cb2b2adf8d8cf442c0b73602f). I've confirmed that the instances of the problem that we saw are fixed by 1b1c81772fe50a. Thanks! https://github.com/llvm/llvm-project/pull/71534 ___

[llvm] [clang] [InstCombine] Infer zext nneg flag (PR #71534)

2023-11-09 Thread Nikita Popov via cfe-commits
nikic wrote: It looks like simplifyAssocCastAssoc() is the problematic transform. It modifies a zext in-place without clearing poison flags. https://github.com/llvm/llvm-project/pull/71534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[llvm] [clang] [InstCombine] Infer zext nneg flag (PR #71534)

2023-11-09 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: Reduced test case: https://godbolt.org/z/d4ETPhbno https://github.com/llvm/llvm-project/pull/71534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [InstCombine] Infer zext nneg flag (PR #71534)

2023-11-09 Thread via cfe-commits
mikaelholmen wrote: I think this patch causes miscompiles. Reproduce with ```opt bbi-88690.ll -passes=instcombine -S -o -``` So with this patch instcombine turns ``` @v_936 = global i16 -3276, align 1 @v_937 = global i24 0, align 1 define i16 @main() { entry: %0 = load i16, ptr @v_936, align 1

[llvm] [clang] [InstCombine] Infer zext nneg flag (PR #71534)

2023-11-08 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/71534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits