rust/tests
Stuart Cook 44ffe1023c
Rollup merge of #144764 - scottmcm:tweak-impossible-discriminant-assume, r=WaffleLapkin
[codegen] assume the tag, not the relative discriminant

Address the issue mentioned in <https://github.com/llvm/llvm-project/issues/134024#issuecomment-3131782555> by changing discriminant calculation to `assume` on the originally-loaded `tag`, rather than on `cast(tag)-OFFSET`.

The previous way does make the *purpose* of the assume clearer, IMHO, since you see `assume(x != 4); if p { x } else { 4 }`, but doing it this way instead means that the `add`s optimize away in LLVM21, which is more important.  And this new way is still easily thought of as being like metadata on the load saying specifically which value is impossible.

Demo of the LLVM20 vs LLVM21 difference: <https://llvm.godbolt.org/z/n54x5Mq1T>

r? ``@nikic``
2025-08-08 12:52:50 +10:00
..
assembly-llvm Rollup merge of #144395 - folkertdev:fortanix-run-make-test, r=jieyouxu 2025-08-02 11:24:23 +02:00
auxiliary So many test updates x_x 2025-07-20 10:15:14 -07:00
codegen-llvm Revert "Preserve the .debug_gdb_scripts section" 2025-08-06 18:01:07 +00:00
codegen-units Auto merge of #142893 - Mark-Simulacrum:no-const-collect, r=oli-obk 2025-06-27 12:57:05 +00:00
coverage coverage: Remove -Zcoverage-options=no-mir-spans 2025-08-04 13:48:40 +10:00
coverage-run-rustdoc
crashes explicit tail call tests with indirect operands in LLVM, small test for indexing into a function table as described by RFC 3407 2025-08-06 18:13:56 -06:00
debuginfo Revert "Embed GDB pretty printers in rlibs and dylibs" 2025-08-06 18:00:58 +00:00
incremental Bless incremental tests. 2025-07-13 13:50:01 +00:00
mir-opt Rollup merge of #143764 - dianne:primary-binding-drop-order, r=Nadrieril,traviscross 2025-08-07 20:49:39 +10:00
pretty expand: Micro-optimize prelude injection 2025-07-28 17:35:09 +03:00
run-make Auto merge of #144997 - BoxyUwU:bootstrap_bump, r=Mark-Simulacrum 2025-08-07 10:56:05 +00:00
rustdoc rustdoc: fix caching of intra-doc links on reexports 2025-08-05 15:34:51 -05:00
rustdoc-gui Add GUI regression test for tooltips i icons 2025-08-04 19:17:08 +02:00
rustdoc-js Add test for aliases partial match 2025-07-16 14:27:22 +02:00
rustdoc-js-std Add test for aliases partial match 2025-07-16 14:27:22 +02:00
rustdoc-json rustdoc-json: Move #[macro_export] from Other to it's own variant 2025-07-30 19:57:32 +00:00
rustdoc-ui Print thread ID in panic message if thread name is unknown 2025-08-06 23:59:47 +00:00
ui Rollup merge of #144400 - Kivooeo:issue3, r=jieyouxu 2025-08-08 12:52:49 +10:00
ui-fulldeps use RustcPublic instead of StableMir 2025-07-18 18:49:32 +00:00
COMPILER_TESTS.md