1. Jun 08, 2022
    • Philip Reames's avatar
      Restore isa<Ty>(X) asserts inside cast<Ty>(X) · f0d2a55d
      Philip Reames authored
      PLEASE DO NOT REVERT without careful consideration, and preferably prior
      discussion.
      
      cast<Ty>(X) is a "checked cast". Its entire purpose is explicitly documented
      (https://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast
      templates) as catching bad casts by asserting that the cast is valid.
      Unfortunately, in a recent rewrite of our casting infrastructure about three
      months back, these asserts got dropped.
      
      This is discussed in more detail on discourse in https://discourse.llvm.org/t/cast-x-is-broken-implications-and-proposal-to-address/63033.
      
      Differential Revision: https://reviews.llvm.org/D127231
      f0d2a55d
    • David Green's avatar
    • Shao-Ce SUN's avatar
      [RISCV] Add ISD::EH_DWARF_CFA · 862f30a4
      Shao-Ce SUN authored
      Based on D24038.
      LLVM has an @llvm.eh.dwarf.cfa intrinsic, used to lower the GCC-compatible __builtin_dwarf_cfa() builtin.
      
      Reviewed By: StephenFan
      
      Differential Revision: https://reviews.llvm.org/D126181
      862f30a4
    • Joseph Huber's avatar
      [Target] Remove `startswith` for adding `SHF_EXCLUDE` to offload section · 9e0dbd2a
      Joseph Huber authored
      Summary:
      We use the special section name `.llvm.offloading` to store device
      imagees in the host object file. We want these to be stripped by the
      linker as they are not used after linking so we use the `SHF_EXCLUDE`
      flag to instruct the linker to drop them. We used to do this for all
      sections that started with `.llvm.offloading` when we encoded metadata
      in the section name itself. Now we embed a special binary containing the
      metadata, we should only add the flag on this name specifically.
      9e0dbd2a
    • Joseph Huber's avatar
      [Libomptarget] Add missing include to define `printf` · 86a4c780
      Joseph Huber authored
      Summary:
      This test was failing because of an implicit declaration of `printf`
      which isn't legal with newer C, causing it to fail. This patch just adds
      the necessary header.
      86a4c780
    • Tue Ly's avatar
      [libc] Add expm1f function to bazel's build overlay. · 63aa8533
      Tue Ly authored
      Add expm1f function to bazel's build overlay.
      
      Reviewed By: gchatelet
      
      Differential Revision: https://reviews.llvm.org/D127298
      63aa8533
    • Matt Arsenault's avatar
      M68k: Fix build · 186a0b4a
      Matt Arsenault authored
      186a0b4a
    • Kito Cheng's avatar
      Revert "[RISCV] Testcase to show wrong register allocation result of subreg liveness" · 6a6f632b
      Kito Cheng authored
      Revert due to failed on LLVM_ENABLE_EXPENSIVE_CHECKS.
      
      This reverts commit cbe22c79.
      6a6f632b
    • Florian Hahn's avatar
      Recommit "[VPlan] Remove uneeded needsVectorIV check." · cedfd7a2
      Florian Hahn authored
      This reverts commit 266ea446.
      
      The reasons for the revert have been addressed by cleaning up condition
      handling in VPlan and properly marking VPBranchOnMaskRecipe as using
      scalars.
      
      The test case for the revert from D123720 has been added in 3d663308.
      cedfd7a2
    • Aaron Ballman's avatar
      Correcting some links in the C status page · 98d4f065
      Aaron Ballman authored
      The paper titles were correct, but the document number and links were
      incorrect (typo'ed numbers).
      98d4f065
    • Nikita Popov's avatar
      [sanitizer] Fix shift UB in LEB128 test · 38ad963c
      Nikita Popov authored
      If u64 and uptr have the same size, then this will perform a shift
      by the bitwidth, which is UB. We only need this code if uptr is
      smaller than u64.
      38ad963c
    • Aaron Ballman's avatar
      Add the 2022 papers to the C status tracking page · bf21cda7
      Aaron Ballman authored
      This adds the papers from Feb 2022 (parts 1 and 2) and May 2022.
      bf21cda7
    • Florian Hahn's avatar
      3d663308
    • Vladislav Khmelevsky's avatar
      [BOLT] Set valid index for functions with profiles · fd960495
      Vladislav Khmelevsky authored
      Some of the passes that calculates tentative layout like LongJmp and
      Golang are expecting that only functions with valid index will be
      located in hot text section. But currently functions with valid profiles
      and not set index are breaking this logic, to fix this we can move the
      hasValidProfile() condition from AssignSections pass to ReorderFunctions.
      
      Vladislav Khmelevsky,
      Advanced Software Technology Lab, Huawei
      
      Differential Revision: https://reviews.llvm.org/D127223
      fd960495
    • lorenzo chelini's avatar
      [MLIR][Math] Add round operation · a0fc94ab
      lorenzo chelini authored
      Introduce RoundOp in the math dialect. The operation rounds the operand to the
      nearest integer value in floating-point format. RoundOp lowers to LLVM
      intrinsics 'llvm.intr.round' or as a function call to libm (round or roundf).
      
      Reviewed By: ftynse
      
      Differential Revision: https://reviews.llvm.org/D127286
      a0fc94ab
    • Simon Pilgrim's avatar
    • Benjamin Kramer's avatar
      [AST] Make header self-contained · b3c0918f
      Benjamin Kramer authored
      There's a dependency in AbstractTypeReader.inc that becomes an error
      after D127231.
      b3c0918f
    • LLVM GN Syncbot's avatar
      [gn build] Port 916e9052 · e21c1b47
      LLVM GN Syncbot authored
      e21c1b47
    • Andrew Ng's avatar
      [CMake] Improve support for ASAN on Windows with MSVC cl & clang-cl · 3d6fcdf9
      Andrew Ng authored
      Tested with MSVC 2019 (19.29) and LLVM 14.0.4.
      
      Differential Revision: https://reviews.llvm.org/D126706
      3d6fcdf9
    • Nikolas Klauser's avatar
      [libc++] Implement ranges::adjacent_find · 916e9052
      Nikolas Klauser authored
      Reviewed By: Mordante, var-const, #libc
      
      Spies: libcxx-commits, mgorny
      
      Differential Revision: https://reviews.llvm.org/D126610
      916e9052
    • Nikita Popov's avatar
      [Docs] Add version support information for opaque pointers (NFC) · 10ac235b
      Nikita Popov authored
      I've seen a few people try to enable opaque pointers with LLVM 14
      already. While LLVM 14 has pretty good baseline support, there are
      enough missing pieces that you're definitely going to hit assertion
      failures if you try this.
      
      Add some wording to make it clear what the support (or planned
      support) for opaque/typed pointers is across LLVM 14, 15, and 16.
      10ac235b
    • Paul Walker's avatar
      [SelectionDAG] Remove invalid TypeSize conversion from PromoteIntRes_BITCAST. · d8835421
      Paul Walker authored
      Extend the TypeWidenVector case of PromoteIntRes_BITCAST to work
      with TypeSize directly rather than silently casting to unsigned.
      
      To accomplish this I've extended TypeSize with an interface that
      essentially allows TypeSize division when both operands have the
      same number of dimensions.
      
      There still exists combinations of scalable vector bitcasts that
      cause compiler crashes. I call these out by adding "is missing"
      entries to sve-bitcast.
      
      Depends on D126957.
      Fixes: #55114
      
      Differential Revision: https://reviews.llvm.org/D127126
      d8835421
    • Paul Walker's avatar
      [SVE] Fix incorrect code generation for bitcasts of unpacked vector types. · a1121c31
      Paul Walker authored
      Bitcasting between unpacked scalable vector types of different
      element counts is not a NOP because the live elements are laid out
      differently.
                     01234567
      e.g. nxv2i32 = XX??XX??
           nxv4f16 = X?X?X?X?
      
      Differential Revision: https://reviews.llvm.org/D126957
      a1121c31
    • Nikita Popov's avatar
      [Bitcode] Re-enable verify-uselistorder test (NFC) · 471bfb70
      Nikita Popov authored
      This issue has since been fixed, so re-enable the commented RUN
      line.
      471bfb70
    • Max Kazantsev's avatar
      [Test] Add XFAIL test for PR55689 · 16c028a8
      Max Kazantsev authored
      SCEV issues in dynamically unreached code, see details at https://github.com/llvm/llvm-project/issues/55689
      
      1st reduced test by Nikic!
      16c028a8
    • Martin Storsjö's avatar
    • Matthias Springer's avatar
      [mlir][bufferize] Improve buffer writability analysis · 032be233
      Matthias Springer authored
      Find writability conflicts (writes to buffers that are not allowed to be written to) by checking SSA use-def chains. This is better than the current writability analysis, which is too conservative and finds false positives.
      
      Differential Revision: https://reviews.llvm.org/D127256
      032be233
    • Chuanqi Xu's avatar
      [NFC] Remove commented cerr debugging loggings · 0e10f128
      Chuanqi Xu authored
      There are some unused cerr debugging loggings in the codes. It is weird
      to remain such commented debug helpers in the product.
      0e10f128
    • David CARLIER's avatar
      [Sanitizers] intercept FreeBSD procctl · c06ef173
      David CARLIER authored
      Reviewers: vitalybuka, emaster
      
      Reviewed-By: viatelybuka
      
      Differential Revision: https://reviews.llvm.org/D127069
      c06ef173
    • Benjamin Kramer's avatar
      [mlir][MemRef] Fix a crash when expanding a scalar shape · 6eb0f8e2
      Benjamin Kramer authored
      In this case the reassociation is empty, yielding no strides for the
      result type.
      
      Differential Revision: https://reviews.llvm.org/D127232
      6eb0f8e2
    • LLVM GN Syncbot's avatar
      [gn build] Port 638b0fb4 · c6d6535a
      LLVM GN Syncbot authored
      c6d6535a
    • Nathan James's avatar
      [ADT][NFC] Early bail out for ComputeEditDistance · 638b0fb4
      Nathan James authored
      The minimun bound for number of edits is the size difference between the 2 arrays.
      If MaxEditDistance is smaller than this, we can bail out early without needing to traverse any of the arrays.
      
      Reviewed By: dblaikie
      
      Differential Revision: https://reviews.llvm.org/D127070
      638b0fb4
    • lorenzo chelini's avatar
      [MLIR][SCF] Improve doc (NFC) · d4847979
      lorenzo chelini authored
      d4847979
    • Kito Cheng's avatar
      Revert "[SplitKit] Handle early clobber + tied to def correctly" · 7207373e
      Kito Cheng authored
      Revert due to failed on LLVM_ENABLE_EXPENSIVE_CHECKS.
      
      This reverts commit e14d0490.
      7207373e
    • Fangrui Song's avatar
      [CMake] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR by default on Linux · 311f7839
      Fangrui Song authored
      This makes the LLVM_ENABLE_PROJECTS mode (supported for compiler-rt, deprecated
      (D112724) for libcxx/libcxxabi/libunwind) closer to
      https://libcxx.llvm.org/BuildingLibcxx.html#bootstrapping-build .
      The layout is arguably superior because different libraries of target triples
      are in different directories, similar to GCC/Debian multiarch.
      
      When LLVM_DEFAULT_TARGET_TRIPLE is x86_64-unknown-linux-gnu,
      `lib/clang/15.0.0/lib/libclang_rt.asan-x86_64.a`
      is moved to
      `lib/clang/15.0.0/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.a`.
      
      In addition, if the host compiler supports -m32 (multilib),
      `lib/clang/15.0.0/lib/libclang_rt.asan-i386.a`
      is moved to
      `lib/clang/15.0.0/lib/i386-unknown-linux-gnu/libclang_rt.asan.a`.
      
      Reviewed By: mstorsjo, ldionne, #libc
      
      Differential Revision: https://reviews.llvm.org/D107799
      311f7839
    • python3kgae's avatar
      [DirectX][Fail crash in DXILPrepareModule pass when input has typed ptr. · 12ca031b
      python3kgae authored
      Check supportsTypedPointers instead of hasSetOpaquePointersValue when query if has typed ptr.
      
      Reviewed By: beanz
      
      Differential Revision: https://reviews.llvm.org/D127268
      12ca031b
    • Kito Cheng's avatar
      [SplitKit] Handle early clobber + tied to def correctly · e14d0490
      Kito Cheng authored
      Spliter will try to extend a live range into `r` slot for a use operand,
      that's works on most situaion, however that not work correctly when the operand
      has tied to def, and the def operand is early clobber.
      
      Give an example to demo what's wrong:
        0  %0 = ...
       16  early-clobber %0 = Op %0 (tied-def 0), ...
       32  ... = Op %0
      
      Before extend:
       %0 = [0r, 0d) [16e, 32d)
      
      The point we want to extend is 0d to 16e not 16r in this case, but if
      we use 16r here we will extend nothing because that already contained
      in [16e, 32d).
      
      This patch add check for detect such case and adjust the extend point.
      
      Detailed explanation for testcase: https://reviews.llvm.org/D126047
      
      Reviewed By: MatzeB
      
      Differential Revision: https://reviews.llvm.org/D126048
      e14d0490
    • Kito Cheng's avatar
      [RISCV] Testcase to show wrong register allocation result of subreg liveness · cbe22c79
      Kito Cheng authored
      This testcase show the live range isn't construct correctly when subreg
      liveness is enabled.
      
      In the testcase `early-clobber-tied-def-subreg-liveness.ll`, first operand of
      `vsext.vf2 v8, v16, v0.t` is both def and use, and the use is come from
      the memory location of `.L__const._Z3foov.var_49`, it's load and spilled
      into stack, and then...v8 is overwrite by another instructions.
      
      ```
      lui a0, %hi(.L__const._Z3foov.var_49)
      addi a0, a0, %lo(.L__const._Z3foov.var_49)
      ...
      vle16.v v8, (a0) # Load value from var_49
      ...
      addi a0, sp, 16
      ...
      vs2r.v v8, (a0) # Spill
      ...
      vl2r.v v8, (a1) # Reload
      ...
      lui a0, %hi(.L__const._Z3foov.var_40)
      addi a0, a0, %lo(.L__const._Z3foov.var_40)
      vle16.v v8, (a0)     # Load value...into v8???
      vmsbc.vx v0, v8, a0  # And use that.
      ...
      vsext.vf2 v8, v16, v0.t # But v8 is here...which is expect value from the reload
      ```
      
      The `early-clobber-tied-def-subreg-liveness.mir` has more detailed
      infomation for that, `%25.sub_vrm2_0` is defined in 64, and used in 464,
      and defined again in 464, and we has used an inline asm to clobber all
      vector register for trigger spliter.
      
      ```
      0B      bb.0.entry:
      16B       %0:gpr = LUI target-flags(riscv-hi) @__const._Z3foov.var_49
      32B       %1:gpr = ADDI %0:gpr, target-flags(riscv-lo) @__const._Z3foov.var_49
      48B       dead $x0 = PseudoVSETIVLI 2, 73, implicit-def $vl, implicit-def $vtype
      64B       undef %25.sub_vrm2_0:vrn4m2nov0 = PseudoVLE16_V_M2 %1:gpr, 2, 4, implicit $vl, implicit $vtype
      80B       %3:gpr = LUI target-flags(riscv-hi) @__const._Z3foov.var_48
      96B       %4:gpr = ADDI %3:gpr, target-flags(riscv-lo) @__const._Z3foov.var_48
      112B      %5:vr = PseudoVLE8_V_M1 %4:gpr, 2, 3, implicit $vl, implicit $vtype
      128B      %6:gpr = LUI target-flags(riscv-hi) @__const._Z3foov.var_46
      144B      %7:gpr = ADDI %6:gpr, target-flags(riscv-lo) @__const._Z3foov.var_46
      160B      %25.sub_vrm2_1:vrn4m2nov0 = PseudoVLE16_V_M2 %7:gpr, 2, 4, implicit $vl, implicit $vtype
      176B      %9:gpr = LUI target-flags(riscv-hi) @__const._Z3foov.var_45
      192B      %10:gpr = ADDI %9:gpr, target-flags(riscv-lo) @__const._Z3foov.var_45
      208B      %25.sub_vrm2_2:vrn4m2nov0 = PseudoVLE16_V_M2 %10:gpr, 2, 4, implicit $vl, implicit $vtype
      224B      INLINEASM &"" [sideeffect] [attdialect], $0:[clobber], ...
      240B      %12:gpr = LUI target-flags(riscv-hi) @__const._Z3foov.var_44
      256B      %13:gpr = ADDI %12:gpr, target-flags(riscv-lo) @__const._Z3foov.var_44
      272B      dead $x0 = PseudoVSETIVLI 2, 73, implicit-def $vl, implicit-def $vtype
      288B      %25.sub_vrm2_3:vrn4m2nov0 = PseudoVLE16_V_M2 %13:gpr, 2, 4, implicit $vl, implicit $vtype
      304B      $x0 = PseudoVSETIVLI 2, 73, implicit-def $vl, implicit-def $vtype
      320B      %16:gpr = LUI target-flags(riscv-hi) @__const._Z3foov.var_40
      336B      %17:gpr = ADDI %16:gpr, target-flags(riscv-lo) @__const._Z3foov.var_40
      352B      %18:vrm2 = PseudoVLE16_V_M2 %17:gpr, 2, 4, implicit $vl, implicit $vtype
      368B      $x0 = PseudoVSETIVLI 2, 73, implicit-def $vl, implicit-def $vtype
      384B      %20:gpr = LUI 1048572
      400B      %21:gpr = ADDIW %20:gpr, 928
      416B      early-clobber %22:vr = PseudoVMSBC_VX_M2 %18:vrm2, %21:gpr, 2, 4, implicit $vl, implicit $vtype
      432B      $x0 = PseudoVSETIVLI 2, 9, implicit-def $vl, implicit-def $vtype
      448B      $v0 = COPY %22:vr
      464B      early-clobber %25.sub_vrm2_0:vrn4m2nov0 = PseudoVSEXT_VF2_M2_MASK %25.sub_vrm2_0:vrn4m2nov0(tied-def 0), %5:vr, killed $v0, 2, 4, 0, implicit $vl, implicit $vtype
      480B      %26:gpr = LUI target-flags(riscv-hi) @var_47
      496B      %27:gpr = ADDI %26:gpr, target-flags(riscv-lo) @var_47
      512B      PseudoVSSEG4E16_V_M2 %25:vrn4m2nov0, %27:gpr, 2, 4, implicit $vl, implicit $vtype
      528B      PseudoRET
      ```
      
      When spliter will try to split %25:
      
      ```
      selectOrSplit VRN4M2NoV0:%25 [64r,160r:4)[160r,208r:0)[208r,288r:1)[288r,464e:2)[464e,512r:3) 0@160r 1@208r 2@288r 3@464e 4@64r  L0000000000000030 [160r,512r:0) 0@160r  L00000000000000C0 [208r,512r:0) 0@208r  L0000000000000300 [288r,512r:0) 0@288r  L000000000000000C [64r,464e:1)[464e,512r:0) 0@464e 1@64r  weight:1.179245e-02 w=1.179245e-02
      ```
      
      ```
      Best local split range: 64r-208r, 6.999861e-03, 3 instrs
          enterIntvBefore 64r: not live
          leaveIntvAfter 208r: valno 1
          useIntv [64B;216r): [64B;216r):1
        blit [64r,160r:4): [64r;160r)=1(%29)(recalc)
        blit [160r,208r:0): [160r;208r)=1(%29)(recalc)
        blit [208r,288r:1): [208r;216r)=1(%29)(recalc) [216r;288r)=0(%28)(recalc)
        blit [288r,464e:2): [288r;464e)=0(%28)(recalc)
        blit [464e,512r:3): [464e;512r)=0(%28)(recalc)
        rewr %bb.0    464e:0  early-clobber %28.sub_vrm2_0:vrn4m2nov0 = PseudoVSEXT_VF2_M2_MASK %25.sub_vrm2_0:vrn4m2nov0(tied-def 0), %5:vr, $v0, 2, 4, 0, implicit $vl, implicit $vtype
        rewr %bb.0    288r:0  %28.sub_vrm2_3:vrn4m2nov0 = PseudoVLE16_V_M2 %13:gpr, 2, 4, implicit $vl, implicit $vtype
        rewr %bb.0    208r:1  %29.sub_vrm2_2:vrn4m2nov0 = PseudoVLE16_V_M2 %10:gpr, 2, 4, implicit $vl, implicit $vtype
        rewr %bb.0    160r:1  %29.sub_vrm2_1:vrn4m2nov0 = PseudoVLE16_V_M2 %7:gpr, 2, 4, implicit $vl, implicit $vtype
        rewr %bb.0    64r:1   undef %29.sub_vrm2_0:vrn4m2nov0 = PseudoVLE16_V_M2 %1:gpr, 2, 4, implicit $vl, implicit $vtype
        rewr %bb.0    464B:0  early-clobber %28.sub_vrm2_0:vrn4m2nov0 = PseudoVSEXT_VF2_M2_MASK %28.sub_vrm2_0:vrn4m2nov0(tied-def 0), %5:vr, $v0, 2, 4, 0, implicit $vl, implicit $vtype
        rewr %bb.0    512B:0  PseudoVSSEG4E16_V_M2 %28:vrn4m2nov0, %27:gpr, 2, 4, implicit $vl, implicit $vtype
        rewr %bb.0    216B:1  undef %28.sub_vrm1_0_sub_vrm1_1_sub_vrm1_2_sub_vrm1_3_sub_vrm1_4_sub_vrm1_5:vrn4m2nov0 = COPY %29.sub_vrm1_0_sub_vrm1_1_sub_vrm1_2_sub_vrm1_3_sub_vrm1_4_sub_vrm1_5:vrn4m2nov0
      queuing new interval: %28 [216r,288r:0)[288r,464e:1)[464e,512r:2) 0@216r 1@288r 2@464e  L000000000000000C [216r,216d:0)[464e,512r:1) 0@216r 1@464e  L0000000000000300 [288r,512r:0) 0@288r  L00000000000000C0 [216r,512r:0) 0@216r  L0000000000000030 [216r,512r:0) 0@216r  weight:8.706897e-03
      Enqueuing %28
      queuing new interval: %29 [64r,160r:0)[160r,208r:1)[208r,216r:2) 0@64r 1@160r 2@208r  L000000000000000C [64r,216r:0) 0@64r  L00000000000000C0 [208r,216r:0) 0@208r  L0000000000000030 [160r,216r:0) 0@160r  weight:1.097826e-02
      Enqueuing %29
      ```
      
      The live range of first part subreg of %25 is become [216r,216d:0)[464e,512r:1),
      however first live range should live until 464e rather than just live
      and [216r,216d:0).
      
      And then the register allocator allocated wrong result accroding the
      live range info.
      
      Reviewed By: craig.topper
      
      Differential Revision: https://reviews.llvm.org/D126047
      cbe22c79
    • Nathan Lanza's avatar
      [MLIR] Add an install target for mlir-libraries · f46ce037
      Nathan Lanza authored
      This is required for the distribution system for installing the
      mlir-libraries component. This is copied from clang's equivalent
      feature.
      
      Differential Revision: https://reviews.llvm.org/D126837
      f46ce037
    • Chuanqi Xu's avatar
      [Debug] [Coroutines] Add deref operator for non complex expression · 733d7cf9
      Chuanqi Xu authored
      Background:
      
      When we construct coroutine frame, we would insert a dbg.declare
      intrinsic for it:
      ```
      %hdl = call void @llvm.coro.begin() ; would return coroutine handle
      call void @llvm.dbg.declare(metadata ptr %hdl, metadata
      ![[DEBUG_VARIABLE: __coro_frame]], metadata !DIExpression())
      ```
      
      And in the splitted coroutine, it looks like:
      ```
      define void @coro_func.resume(ptr *hdl) {
      entry.resume:
          call void @llvm.dbg.declare(metadata ptr %hdl, metadata
      ![[DEBUG_VARIABLE: __coro_frame]], metadata !DIExpression())
      }
      ```
      
      And we would salvage the debug info by inserting a new alloca here:
      ```
      define void @coro_func.resume(ptr %hdl) {
      entry.resume:
          %frame.debug = alloca ptr
          call void @llvm.dbg.declare(metadata ptr %frame.debug, metadata
      ![[DEBUG_VARIABLE: __coro_frame]], metadata !DIExpression())
          store ptr %hdl, %frame.debug
      }
      ```
      
      But now, the problem comes since the `dbg.declare` refers to the address
      of that alloca instead of actual coroutine handle. I saw there are codes
      to solve the problem but it only applies to complex expression only. I
      feel if it is OK to relax the condition to make it work for
      `__coro_frame`.
      
      Reviewed By: jmorse
      
      Differential Revision: https://reviews.llvm.org/D126277
      733d7cf9