about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2025-04-07 18:12:06 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2025-04-07 18:12:06 -0700
commit502f7f9c241b35d65f4538d28c43e6feca474df2 (patch)
tree30af419459c7b7031ab64bf128edb005931399e3 /compiler/rustc_codegen_ssa
parent51e67e21cf2ca50a431d392a03dcc66377a365cd (diff)
downloadrust-502f7f9c241b35d65f4538d28c43e6feca474df2.tar.gz
rust-502f7f9c241b35d65f4538d28c43e6feca474df2.zip
Address PR feedback
Diffstat (limited to 'compiler/rustc_codegen_ssa')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/operand.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/operand.rs b/compiler/rustc_codegen_ssa/src/mir/operand.rs
index fca0695f296..eade9e52de9 100644
--- a/compiler/rustc_codegen_ssa/src/mir/operand.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/operand.rs
@@ -581,7 +581,9 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> {
                 );
 
                 // In principle we could insert assumes on the possible range of `discr`, but
-                // currently in LLVM this seems to be a pessimization.
+                // currently in LLVM this isn't worth it because the original `tag` will
+                // have either a `range` parameter attribute or `!range` metadata,
+                // or come from a `transmute` that already `assume`d it.
 
                 discr
             }