llvm/llvm/test/CodeGen/AArch64/pr66603.ll

; 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
}