diff options
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r-- | llvm/test/Transforms/CodeGenPrepare/X86/widen_switch.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/Transforms/CodeGenPrepare/X86/widen_switch.ll b/llvm/test/Transforms/CodeGenPrepare/X86/widen_switch.ll index 23f120f1a23..82c9938336e 100644 --- a/llvm/test/Transforms/CodeGenPrepare/X86/widen_switch.ll +++ b/llvm/test/Transforms/CodeGenPrepare/X86/widen_switch.ll @@ -1,6 +1,7 @@ ;; x86 is chosen to show the transform when 8-bit and 16-bit registers are available. ; RUN: opt < %s -codegenprepare -S -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=X86 +; RUN: opt < %s -debugify -codegenprepare -S -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=DEBUG ; No change for x86 because 16-bit registers are part of the architecture. @@ -60,6 +61,13 @@ return: ; X86-NEXT: switch i32 %0, label %sw.default [ ; X86-NEXT: i32 10, label %sw.bb0 ; X86-NEXT: i32 131071, label %sw.bb1 + +; DEBUG-LABEL: @widen_switch_i17( +; DEBUG: zext i17 %trunc to i32, !dbg [[switch_loc:![0-9]+]] +; DEBUG-NEXT: switch i32 {{.*}} [ +; DEBUG-NEXT: label %sw.bb0 +; DEBUG-NEXT: label %sw.bb1 +; DEBUG-NEXT: ], !dbg [[switch_loc]] } ; If the switch condition is a sign-extended function argument, then the |