Files
clang-p2996/llvm/test/Transforms/PartiallyInlineLibCalls/X86/musttail.ll
Bert Abrath 019e7b7f6e [PartiallyInlineLibCalls] Don't partially inline a musttail libcall.
Partially inlining a libcall that has the musttail attribute
leads to broken LLVM IR, triggering an assertion in the IR verifier.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D123116
2022-04-05 22:30:50 +03:00

15 lines
528 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -partially-inline-libcalls -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
; RUN: opt -S -passes=partially-inline-libcalls -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s
define double @foo(double %x) {
; CHECK-LABEL: @foo(
; CHECK-NEXT: [[R:%.*]] = musttail call double @sqrt(double [[X:%.*]])
; CHECK-NEXT: ret double [[R]]
;
%r = musttail call double @sqrt(double %x)
ret double %r
}
declare double @sqrt(double)