
This patch adds default attributes to many intrinsics and the WillReturn attribute to some as well. The defaults include WillReturn. The WillReturn attribute is relevant for dead code elimination as intrinsics without WillReturn are assumed to have side effects and cannot be removed even if their return value is unused. It is also relevant for potential changes to SDAG behavior regarding treatment of intrinsics that function as loads.
14 lines
414 B
LLVM
14 lines
414 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: opt -S < %s -passes=dce | FileCheck %s
|
|
|
|
declare float @llvm.wasm.loadf16.f32(ptr)
|
|
|
|
define void @test_llvm_wasm_loadf16_f32(ptr %a) {
|
|
; CHECK-LABEL: define void @test_llvm_wasm_loadf16_f32(
|
|
; CHECK-SAME: ptr [[A:%.*]]) {
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
%v = call float @llvm.wasm.loadf16.f32(ptr %a)
|
|
ret void
|
|
}
|