35 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2 3; Check the attribute.4 5; RUN: llc < %s -mtriple=x86_64-- -mattr=-sbb-dep-breaking | FileCheck %s --check-prefixes=ZERO6; RUN: llc < %s -mtriple=x86_64-- -mattr=+sbb-dep-breaking | FileCheck %s --check-prefixes=IDIOM7 8; And check that CPUs have included the attribute as expected.9 10; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s --check-prefixes=ZERO11; RUN: llc < %s -mtriple=x86_64-- -mcpu=sandybridge | FileCheck %s --check-prefixes=ZERO12; RUN: llc < %s -mtriple=x86_64-- -mcpu=skylake | FileCheck %s --check-prefixes=ZERO13; RUN: llc < %s -mtriple=x86_64-- -mcpu=k8 | FileCheck %s --check-prefixes=IDIOM14; RUN: llc < %s -mtriple=x86_64-- -mcpu=btver1 | FileCheck %s --check-prefixes=IDIOM15; RUN: llc < %s -mtriple=x86_64-- -mcpu=bdver2 | FileCheck %s --check-prefixes=IDIOM16; RUN: llc < %s -mtriple=x86_64-- -mcpu=znver3 | FileCheck %s --check-prefixes=IDIOM17 18define i32 @i32_select_0_or_neg1(i32 %x) {19; ZERO-LABEL: i32_select_0_or_neg1:20; ZERO: # %bb.0:21; ZERO-NEXT: xorl %eax, %eax22; ZERO-NEXT: negl %edi23; ZERO-NEXT: sbbl %eax, %eax24; ZERO-NEXT: retq25;26; IDIOM-LABEL: i32_select_0_or_neg1:27; IDIOM: # %bb.0:28; IDIOM-NEXT: negl %edi29; IDIOM-NEXT: sbbl %eax, %eax30; IDIOM-NEXT: retq31 %cmp = icmp ne i32 %x, 032 %sel = select i1 %cmp, i32 -1, i32 033 ret i32 %sel34}35