Files
clang-p2996/llvm/test/CodeGen/AArch64/pr66603.ll
Simon Pilgrim 8505c3b15b [DAG] canCreateUndefOrPoison - remove AssertSext/AssertZext assumption that they never create undef/poison
We need to assume that we generate poison if the assertions failed

Fixes #66603
2023-10-19 13:28:53 +01:00

16 lines
523 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
; RUN: llc < %s -mtriple=aarch64-- -verify-machineinstrs | FileCheck %s
; Don't fold freeze(assertsext(x)) -> assertsext(freeze(x))
define i32 @PR66603(double %x) nounwind {
; CHECK-LABEL: PR66603:
; CHECK: // %bb.0:
; CHECK-NEXT: fcvtzs w8, d0
; CHECK-NEXT: sxtb w0, w8
; CHECK-NEXT: ret
%as_i8 = fptosi double %x to i8
%frozen_i8 = freeze i8 %as_i8
%ext = sext i8 %frozen_i8 to i32
ret i32 %ext
}