diff gcc/testsuite/gcc.dg/tree-ssa/switch-3.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/gcc.dg/tree-ssa/switch-3.c	Thu Oct 25 07:37:49 2018 +0900
@@ -0,0 +1,20 @@
+/* { dg-options "-O2 -fdump-tree-switchlower1" } */
+
+int cipher_to_alg(int cipher)        
+{                                    
+  switch (cipher)              
+    {                            
+      case 8:   return 2;  
+      case 16:  return 3;  
+      case 32:  return 4;  
+      case 64:  return 6;  
+      case 256: return 9;  
+      case 512: return 10; 
+      case 2048: return 11;
+      case 4096: return 12;
+      case 8192: return 13;
+    }                            
+  return 0;                    
+}     
+
+/* { dg-final { scan-tree-dump-times "if \\(cipher\[^\n ]*" 12 "switchlower1" } } */