[llvm] [Analysis] Attribute Range should not prevent tail call optimization (PR #91122)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue May 7 18:23:59 PDT 2024
================
@@ -0,0 +1,53 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
+; RUN: llc -mtriple=x86_64-linux < %s | FileCheck %s
+
+define range(i32 0, 2) i32 @foo(ptr %this) {
+; CHECK-LABEL: foo:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: movzbl 0, %eax
+; CHECK-NEXT: retq
+entry:
+ %call = load volatile i1, ptr null, align 1
----------------
nikic wrote:
```suggestion
%call = load volatile i1, ptr %this, align 1
```
was possibly intended here? Best to avoid "obviously UB" inputs when we can...
https://github.com/llvm/llvm-project/pull/91122
More information about the llvm-commits
mailing list